I have changed the Authentication table for my Laravel 5.8 project.
However when I try to login, I am getting the below error :
SQLSTATE[42S22]: Column not found: 1054 Unknown column '' in 'where clause' (SQL: select * from customer where `` = 1 limit 1)
This is how my auth.php looks:
'providers' => [
    'users' => [
        'driver' => 'eloquent',
        'model' => \App\Models\Sop\Customer::class
    ]
]
Customer model class :
class Customer extends Model implements Authenticatable
{
protected $table = "customer";
protected $primaryKey = 'customer_id';
protected $connection = "sop";
protected $fillable = [
    'customer_ref',
    'customer_status_id',
    'registration_level',
    'email_address',
    'username',
    'password',
    'verification_code'
];
public function getAuthIdentifier()
{
    return $this->customer_id;
}
public function getAuthPassword()
{
    return $this->password;
}
public function getRememberToken()
{
    if (!empty($this->getRememberTokenName())) {
        return $this->{$this->getRememberTokenName()};
    }
}
public function setRememberToken($value)
{
    if (!empty($this->getRememberTokenName())) {
        $this->{$this->getRememberTokenName()} = $value;
    }
}
public function getRememberTokenName()
{
    return $this->remember_token;
}
/**
 * Get the name of the unique identifier for the user.
 *
 * @return string
 */
public function getAuthIdentifierName()
{
    return $this->customer_id;
}
}
However when trying to upload it's erroring when this line is called :
Auth::check()
If there's anything I missed out which I should have added in the question please ask and I will update the question.
via Chebli Mohamed
 
Aucun commentaire:
Enregistrer un commentaire