// comment line and add function // protected $redirectTo = RouteServiceProvider::HOME; public function redirectTo(){ return Auth::user()->type == 'admin' ? route('admin.home') : route('staff.home'); }