'datetime', ]; public function getTable() { return static::$tableName; } public static function booted(): void { static::creating(function ($model) { $authGuard = $model->auth_guard ?? config('auth.defaults.guard'); if (! Auth::guard($authGuard) instanceof StatefulGuard) { throw new StatefulGuardRequiredException($authGuard); } $model->created_at = $model->created_at ?? $model->freshTimestamp(); $model->token = $model->token ?? Str::random(128); $model->auth_guard = $authGuard; }); } }