/** * Performs the login redirect action. * * If the authenticated user has admin permissions * then they will be redirected into the admin * panel. If they do no, they will be sent * to the homepage of the website. * * @return \Illuminate\Http\RedirectReponse */ public function redirectPath() { if (Permissions::check()) { return Flare::adminUrl(); } return '/'; }
/** * Performs the login redirect action. * * If the authenticated user has admin permissions * then they will be redirected into the admin * panel. If they do no, they will be sent * to the homepage of the website. * * @return \Illuminate\Http\RedirectReponse */ protected function loginRedirect() { if (Permissions::check()) { return redirect()->intended(Flare::adminUrl()); } return redirect('/'); }
/** * Determines if a class is available for the current User. * * @param string $class * * @return bool */ private function availableClass($class) { if (!Permissions::check($class)) { return false; } return true; }