-
Notifications
You must be signed in to change notification settings - Fork 0
Flash Messages
Alex Torscho edited this page Feb 4, 2015
·
2 revisions
The class FlashHelper (Flash facade) makes the creating of flash messages easier.
It has 4 methods:
success()info()warning()danger()
All of them output a Twitter Bootstrap alert with corresponding color-scheme.
Instead of writing
return Redirect::back()->with('success', 'You have successfully logged in.');you can write
Flash::success('You have successfully logged in.')
return Redirect::back();or
Flash::success('loggedIn')
return Redirect::back();If you have a lang key loggedIn in labels.php file, otherwise it echoes an alert with the parameter string as it is.