0
votes

User.php

namespace App;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Foundation\Auth\User as Authenticatable;

class User extends Authenticatable
{
    protected $fillable = ['name','email','password'];

}

Error occurs when attempting to login in Laravel.

Error:

Argument 1 passed to Illuminate\Auth\EloquentUserProvider::validateCredentials() must be an instance of Illuminate\Contracts\Auth\Authenticatable, instance of App\User given, called in F:\eStore\vendor\laravel\framework\src\Illuminate\Auth\SessionGuard.php on line 385

1
Hi. Please show us your User.php code.Rouhollah Mazarei
what is the error you are getting please post the errorPalak Jadav

1 Answers

0
votes

You need to add implements \Illuminate\Contracts\Auth\Authenticatable to your User model class definition.

  class User extends Model implements \Illuminate\Contracts\Auth\Authenticatable {
    }