php - Laravel: Unable to echo $message variable after Reirection with $message -


i redirecting using following code

return redirect::to("update/a/product") ->with("message", "product updated"); 

but when try echo $message variable inside view, error of undefined variable.

how defining/echoing $message? since returning redirect flash data, access using session::get(), can check there first session::has()

<?php if (session::has('message')) {     $message = session::get('message');     echo $message; } ?> 

Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

c# - must be a non-abstract type with a public parameterless constructor in redis -

ajax - PHP/JSON Login script (Twitter style) not setting sessions -