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? -

html - Unable to style the color of bullets in a list -

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