You don't need token
in POST. You use that for the GET request. You could simply do.
$credentials = Input::only([
'email',
'password',
'password_confirmation'
]);
Check your config/auth.php to see what you have set for the reminder table.
The default is
'reminder' => array(
'email' => 'emails.auth.reminder',
'table' => 'password_reminders',
'expire' => 60,
),
Thanks for the replies. I had the remove the token from the credentials like geocine said.
The EloquentUserProvider (Illuminate\Auth ) retrieveByCredentials just loops trough the array and adds it to the query.
public function retrieveByCredentials(array $credentials)
{
// First we will add each credential element to the query as a where clause.
// Then we can execute the query and, if we found a user, return it in a
// Eloquent User "model" that will be utilized by the Guard instances.
$query = $this->createModel()->newQuery();
foreach ($credentials as $key => $value)
{
if ( ! str_contains($key, 'password')) $query->where($key, $value);
}
return $query->first();
}
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community