Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

laravel controller return message

#In Controller
use Session;
       
Session::flash('message', "Special message goes here");
return Redirect::back();

#In View
@if (Session::has('message'))
   <div class="alert alert-info">{{ Session::get('message') }}</div>
@endif
 
PREVIOUS NEXT
Tagged: #laravel #controller #return #message
ADD COMMENT
Topic
Name
1+7 =