Answers for "use middleware in controller to have access session"

PHP
0

use middleware in controller to have access session

$this->middleware(function($request,$next){
  if (session('success')) {
  	Alert::success(session('success'));
  }

  if (session('error')) {
  	Alert::success(session('error'));
  }

  return $next($request);
});
Posted by: Guest on May-19-2021

Code answers related to "use middleware in controller to have access session"

Browse Popular Code Answers by Language