【发布时间】:2017-03-08 19:41:17
【问题描述】:
Laravel 5.3 发生了一些变化。在文档中有这个控制器,我们可以在其中添加附加条件:
<?php
namespace App\Http\Controllers;
use Illuminate\Support\Facades\Auth;
class AuthController extends Controller
{
/**
* Handle an authentication attempt.
*
* @return Response
*/
public function authenticate()
{
if (Auth::attempt(['email' => $email, 'password' => $password])) {
// Authentication passed...
return redirect()->intended('dashboard');
}
}
}
但是这个控制器:AuthController 已经不存在了..... 只有LoginController
我应该创建那个 AuthController 还是什么?
所以问题是如何为用户添加一个登录条件
'active' => 1
【问题讨论】:
标签: laravel authentication laravel-5.3