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);
});