/** * Handle an incoming request. * * @param \Illuminate\Http\Request $request * @param \Closure $next * @return mixed */ public function handle($request, Closure $next) { if ($this->auth->travel_company_staff()->get()) { return redirect()->route('companyLogin'); } elseif ($this->auth->staff()->get()) { return redirect()->route('adminLogin'); } return $next($request); }