JeffreyR
JeffreyR

Reputation: 591

How to get a message from a redirect in Laravel

return Redirect::to('KSMschema')->with('message', $HeadNr)->withErrors($v); } I have a redirect message called 'message'. How do i display this message in my view?

Hello,

This does not work. It only seems to work if you make a View.

I can't find anything in the laravel documentaion about displaying messages in a view from a Redirect. http://laravel.com/docs/responses

Upvotes: 0

Views: 89

Answers (1)

Antonio Carlos Ribeiro
Antonio Carlos Ribeiro

Reputation: 87789

Redirected messages come back stored in the Session, If you do:

Redirect::to('KSMschema')->with('message', $HeadNr);

You have to

echo Session::get('message);

Upvotes: 1

Related Questions