Quantcast
Channel: Laravel 4 how to display flash message in view? - Stack Overflow
Viewing all articles
Browse latest Browse all 12

Answer by Trying Tobemyself for Laravel 4 how to display flash message in view?

$
0
0

when you set variable or message using ->with() it doesn't set the variable/message in the session flash, rather it creates an variable which is available in your view, so in your case just use $success instead of Session::get('success')

And in case you want to set the message in the session flash the use this Session::flash('key', 'value'); but remember with session flash the data is available only for next request.

Otherwise you can use Session::put('key', 'value'); to store in session

for more info read here


Viewing all articles
Browse latest Browse all 12

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>