I have database radius
with table radcheck
without migration. I want table radcheck
as table authentication,not users.i try change config/auth
from 'user' to radcheck
. but an error
Table radcheck
:
id,
username,
attribute,
op,
value=> as password,
barcode
Code in radcheck.php
:
namespace App\Model\Management;
use Illuminate\Database\Eloquent\Model;
class Radcheck extends Model
{
protected $table = 'radcheck';
protected $primarykey = 'id';
protected $fillable = ['id','username','attribute','op','value','barcode'];
public $timestamps = false;
public function radusergroups(){
return $this->hasMany('App\Model\Management\Radusergroup');
}
}
and then, I change config/auth from users to radcheck in Config/auth
:
'providers' => [
'users' => [
'driver' => 'eloquent',
'model' => App\Model\Management\Radcheck::class,
],
Error looks like this:
Argument 1 passed to Illuminate\Auth\EloquentUserProvider::validateCredentials() must be an instance of Illuminate\Contracts\Auth\Authenticatable, instance of App\Model\Management\Radcheck given, called in C:\xampp\htdocs\e-access\system\vendor\laravel\framework\src\Illuminate\Auth\SessionGuard.php on line 385 and defined