I'm trying to get my Auth::attemp();
to work. But it keeps returning false;
This is my api login:
public function login(Request $request)
{
if(Auth::attempt($request->parameters[0]))
{
dd('true');
}
else {
dd('false');
}
}
When I make a post request with postman:
{"parameters":[
{"email":"test@gmail.com","password":"testtest"}
]}
It returns false while the credentials are right (checked that multiple times)
I've changed the user model to employee. And put it in a other directory. I've changed that in App\config\auth.php
'providers' => [
'users' => [
'driver' => 'eloquent',
'model' => App\src\employee\Employee::class,
],
What should I do? Did I forgot something?