Open XternalSoft opened 11 months ago
A possible solution to this is to extends Lab404\AuthChecker\Models\Login into a custom Login model and put the device_id into fillables. But I think is not the "best" solution.
use Lab404\AuthChecker\Models\Login as Lab404Login;
final class Login extends Lab404Login
{
/** @var array $fillable */
protected $fillable = [
'created_at',
'device_id',
'ip_address',
'type',
'user_id',
'user_type',
];
}
And auth-checker.php config:
'models' => [
// Ex: App\Models\Device (default: Lab404\AuthChecker\Models\Device)
'device' => null,
// Ex: App\Models\Login (default: Lab404\AuthChecker\Models\Login)
'login' => Login::class, // <- Your custom Login class here
],
Cheers!
lab404/laravel-auth-checker v2.0
Use this line in AppServiceProvider
Model::shouldBeStrict(!$this->app->isProduction());