In laravel for login attempt I generally use something like this
if (Auth::attempt(array('email' => $usernameinput, 'password' => $password), true))
{
// The user is being remembered...
}
Basically $usernameinput will check with email from my table.
I was thinking to do it in a different way, like there is email, username and password in my table. $usernameinput can be either email or username field in my table.
How can I Auth::attempt with a condition like:
(email==$usernameinput OR username==$usernameinput) AND password == $password
I have read some articles but I didn't understand it can you explain it