Support the ongoing development of Laravel.io →
Session Packages
Last updated 1 year ago.
0

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.

Last updated 1 year ago.
0

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.

Last updated 1 year ago.
0

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.

Last updated 1 year ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

chriship chriship Joined 7 Mar 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.