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. */