flash
flash copied to clipboard
Add 'danger' method to match bootstrap class
There are four "standard" bootstrap alert classes in addition to the other less standard alerts. The four "proper" alert types are success, info, warning and danger. The alert-danger class does not match the ->error() method name like the other methods do. This leads to confusing behavior.
flash($message)->info(); => class="alert alert-info"
flash($message)->success(); => class="alert alert-success"
flash($message)->warning(); => class="alert alert-warning"
flash($message)->danger(); Does not exist
flash($message)->error(); => class="alert alert-danger"
The original ->error() method remains unchanged for backwards compatibility.