flash icon indicating copy to clipboard operation
flash copied to clipboard

Add 'danger' method to match bootstrap class

Open danswiser opened this issue 6 years ago • 0 comments

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.

danswiser avatar Feb 20 '20 20:02 danswiser