public function handle($request, Closure $next) { if ($request->user()->type != 'A') { return redirect('home'); } return $next($request); }