- php
- namespace App\Http\Controllers;
- use Auth;
- use Illuminate\Routing\Controller;
- classAuthControllerextends Controller{
- /**
- * 处理登录认证
- *
- * @return Response
- */
- public function authenticate()
- {
- if(Auth::attempt(['email' => $email, 'password' => $password])) {
- // 认证通过...
- returnredirect()->intended('dashboard');
- }
- }
- }
来源: http://www.bubuko.com/infodetail-1975666.html