From 5ca882659d1ae498f66594bb997ac9abe598baea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Munsch?= Date: Wed, 26 Aug 2026 10:04:36 +0200 Subject: [PATCH] fix(auth): point auth provider to ApiClient and remove dead UserFactory (F-2026-0006) --- config/auth.php | 4 +-- database/factories/UserFactory.php | 46 ------------------------------ 2 files changed, 2 insertions(+), 48 deletions(-) delete mode 100644 database/factories/UserFactory.php diff --git a/config/auth.php b/config/auth.php index 3975db6..3807c3c 100644 --- a/config/auth.php +++ b/config/auth.php @@ -2,7 +2,7 @@ declare(strict_types=1); -use App\Models\User; +use Infra\Database\Models\ApiClient; return [ @@ -66,7 +66,7 @@ return [ 'providers' => [ 'users' => [ 'driver' => 'eloquent', - 'model' => env('AUTH_MODEL', User::class), + 'model' => env('AUTH_MODEL', ApiClient::class), ], // 'users' => [ diff --git a/database/factories/UserFactory.php b/database/factories/UserFactory.php deleted file mode 100644 index d2c4b35..0000000 --- a/database/factories/UserFactory.php +++ /dev/null @@ -1,46 +0,0 @@ - - */ -class UserFactory extends Factory -{ - /** - * The current password being used by the factory. - */ - protected static ?string $password; - - /** - * Define the model's default state. - * - * @return array - */ - public function definition(): array - { - return [ - 'name' => fake()->name(), - 'email' => fake()->unique()->safeEmail(), - 'email_verified_at' => now(), - 'password' => static::$password ??= Hash::make('password'), - 'remember_token' => Str::random(10), - ]; - } - - /** - * Indicate that the model's email address should be unverified. - */ - public function unverified(): static - { - return $this->state(fn (array $attributes) => [ - 'email_verified_at' => null, - ]); - } -}