Answers for "laravel controller return message"

PHP
1

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
Posted by: Guest on June-28-2021

Code answers related to "laravel controller return message"

Browse Popular Code Answers by Language