From c0f4e98f10f2fda46156bab1ca23469477a5ca37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=2E=20Nagy=20Gerg=C5=91?= Date: Tue, 26 Mar 2024 15:02:42 +0100 Subject: [PATCH] update factories --- database/factories/AddressFactory.php | 10 ++++++++++ database/factories/CategoryFactory.php | 10 ++++++++++ 2 files changed, 20 insertions(+) diff --git a/database/factories/AddressFactory.php b/database/factories/AddressFactory.php index 5b09a384..b99686f0 100644 --- a/database/factories/AddressFactory.php +++ b/database/factories/AddressFactory.php @@ -15,6 +15,16 @@ class AddressFactory extends Factory */ protected $model = Address::class; + /** + * Get the name of the model that is generated by the factory. + * + * @return class-string<\Illuminate\Database\Eloquent\Model|TModel> + */ + public function modelName(): string + { + return $this->model::getProxiedClass(); + } + /** * Define the model's default state. */ diff --git a/database/factories/CategoryFactory.php b/database/factories/CategoryFactory.php index 1b8d3b4f..a97fad32 100644 --- a/database/factories/CategoryFactory.php +++ b/database/factories/CategoryFactory.php @@ -15,6 +15,16 @@ class CategoryFactory extends Factory */ protected $model = Category::class; + /** + * Get the name of the model that is generated by the factory. + * + * @return class-string<\Illuminate\Database\Eloquent\Model|TModel> + */ + public function modelName(): string + { + return $this->model::getProxiedClass(); + } + /** * Define the model's default state. */