Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add 'danger' method to match bootstrap class #158

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,10 @@ public function store()
You may also do:

- `flash('Message')->success()`: Set the flash theme to "success".
- `flash('Message')->error()`: Set the flash theme to "danger".
- `flash('Message')->danger()`: Set the flash theme to "danger".
- `flash('Message')->warning()`: Set the flash theme to "warning".
- `flash('Message')->info()`: Set the flash theme to "info".
- `flash('Message')->error()`: Set the flash theme to "danger".
- `flash('Message')->overlay()`: Render the message as an overlay.
- `flash()->overlay('Modal Message', 'Modal Title')`: Display a modal overlay with a title.
- `flash('Message')->important()`: Add a close button to the flash message.
Expand Down
11 changes: 11 additions & 0 deletions src/Laracasts/Flash/FlashNotifier.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,17 @@ public function error($message = null)
return $this->message($message, 'danger');
}

/**
* Flash a danger message.
*
* @param string|null $message
* @return $this
*/
public function danger($message = null)
{
return $this->message($message, 'danger');
}

/**
* Flash a warning message.
*
Expand Down