Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Setting display time of flash message in laravel 4.2

Normally in Laravel 4.2 when we create flash message by

Session::flash('message','This is flash message');

and display it by

Session::get('message'); 

It will disappear when we refresh the page.

The question is how could we set the display time of this flash message?

(For example: After 3 seconds, this message will disappear!).

like image 428
Alex Avatar asked Dec 24 '22 19:12

Alex


1 Answers

This is how you would do it.

$('div.alert').delay(3000).slideUp(300);

change alert to whatever class you are using to display error message.

like image 67
Chaudhry Waqas Avatar answered Jan 07 '23 18:01

Chaudhry Waqas