I create a separate partial (eg. flash.blade.php), and include it in my layout (right after body).
The content of the flash.blade.php file is:
{{ Notification:all() }}
This displays all notification, with appropriate color formatting depending on the type, if you are using Bootstrap.
Ah, thanks! I was doing {{ Notification::showAll() }}
Do you also know how to deal with laravel's withErrors() method?
return Redirect::to('users')->withInput()->withErrors($v);
How can I show these?
Edit: I must have been doing something else wrong because showAll works now.
The Notification are used to give mesages (lilke "Resource created", "Resource updated"); while withErrors is used to pass the validation object and have the validation errors in the view.
Please refer to: http://laravel.com/docs/validation#error-messages-and-views
Basically in your views, you always have $errors object, from which you can pull and show validation errors.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community