Skip to content

Commit

Permalink
update factories
Browse files Browse the repository at this point in the history
  • Loading branch information
iamgergo committed Mar 26, 2024
1 parent 86bc6ed commit c0f4e98
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
10 changes: 10 additions & 0 deletions database/factories/AddressFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down
10 changes: 10 additions & 0 deletions database/factories/CategoryFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down

0 comments on commit c0f4e98

Please sign in to comment.