Pro Laravel giúp em với ! Câu hỏi về Manually Authenticating trong Laravel

Minh Hoàng
Answered Oct 8th, 2020 7:17 a.m.
Với Auth::attemp thì bạn cũng có thể thêm các điều kiện bổ sung vào truy vấn xác thực, vì nó nhận 1 array để check, ví dụ:
if (Auth::attempt(array('email' => $email, 'password' => $password, 'role_id' => 1])))
{
// The user is active, not suspended, and exists.
}
0
Organizations
43
100
520
284.6K
2
39
100
2.3K
6
23
28
5.4K