Accessing group on the interface Illuminate\Contracts\Auth\Authenticatable suggest that you code against a concrete implementation. How about adding an instanceof check?
Loading history...
28
45
return $next($request);
29
}
30
31
// Return to homepage if user il logged but not admin
32
return redirect('/')->with('message', 'You have not admin access');