当前位置: 首页>>代码示例>>PHP>>正文


PHP Auth::viaRemember方法代码示例

本文整理汇总了PHP中Illuminate\Support\Facades\Auth::viaRemember方法的典型用法代码示例。如果您正苦于以下问题:PHP Auth::viaRemember方法的具体用法?PHP Auth::viaRemember怎么用?PHP Auth::viaRemember使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Illuminate\Support\Facades\Auth的用法示例。


在下文中一共展示了Auth::viaRemember方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 public function __construct()
 {
     $this->loggedInUser = Auth::User();
     $this->loggedInViaRememberMe = Auth::viaRemember();
     view()->share('isSignedIn', Auth::check());
     view()->share('user', $this->loggedInUser);
 }
开发者ID:BarkaBoss,项目名称:TheHex,代码行数:7,代码来源:Controller.php

示例2: getLogin

 /**
  * Show the application login form.
  *
  * @return \Illuminate\Http\Response
  */
 public function getLogin()
 {
     if (Auth::viaRemember()) {
         redirect()->intended($this->redirectPath());
     }
     return view('auth.login');
 }
开发者ID:BlueBayTravel,项目名称:deployer,代码行数:12,代码来源:AuthController.php

示例3: getLogin

 public function getLogin()
 {
     if (Auth::viaRemember()) {
         return redirect()->intended('admin');
     }
     return view('admin::login');
 }
开发者ID:Phrantiques,项目名称:toolbox-laravel,代码行数:7,代码来源:AuthController.php

示例4: handle

 public function handle($request, Closure $next)
 {
     if (!Auth::check() or Auth::viaRemember()) {
         return redirect()->route('home.index')->withErrors(['Por favor, faça o login']);
     }
     $role = $this->authService->getUserRole();
     if ($role != 'aluno') {
         return redirect()->back()->withErrors(['Você não tem permissão para acessar esta página']);
     }
     return $next($request);
 }
开发者ID:RenatoTheodoro,项目名称:mahaGeo,代码行数:11,代码来源:AlunoAuth.php

示例5: showLoginView

 function showLoginView()
 {
     if (Auth::check()) {
         return View::make('about');
         // return Redirect::to('/about');
     }
     if (Auth::viaRemember()) {
         return View::make('about');
         //return Redirect::to('/about');
     }
     return View::make('login');
 }
开发者ID:shahariar007,项目名称:LaravelTest,代码行数:12,代码来源:loginController.php

示例6: createLogin

 public function createLogin(Request $request)
 {
     $user_name = $request->input('user_name');
     $password = $request->input('password');
     //This line creates a login in credential for you
     $user = (new user())->create(['user_name' => $user_name, 'password' => Hash::make($password), "user_role" => 1]);
     if (Auth::attempt(['user_name' => $user_name, 'password' => $password], true) || Auth::viaRemember()) {
         return redirect('/dashboard');
     }
     return $this->getLogin();
 }
开发者ID:bigschlong69,项目名称:capstoneAll,代码行数:11,代码来源:AuthController.php

示例7: login

 /**
  * Login page of the user
  *
  * @return $this|Redirect
  */
 public function login()
 {
     if (Auth::check()) {
         //if user already logged in
         return redirect($this->login_redirect);
     } elseif (Auth::viaRemember()) {
         //if user set remember me token
         return redirect($this->login_redirect);
     } else {
         return view('users::login')->with('layout', $this->layout);
     }
 }
开发者ID:gitllermopalafox,项目名称:user,代码行数:17,代码来源:UsersController.php


注:本文中的Illuminate\Support\Facades\Auth::viaRemember方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。