I am newcomer in Laravel. I have a problem with session flash in Middleware. In Middleware:
public function handle($request, Closure $next)
{
if(auth()->check()){
return $next($request);
}else{
Notification::error('Please login');
return redirect()->route('admin.auth.login.get')->with('test',' session');
}
}
In View:
I get Nofitication but nothing happen. I check with flash session (session('test'))-> nothing happen.
Please help to explain me why it dont work? and what's solution?.
Thank you very much and sorry about my English.