Skip to content

Commit

Permalink
Reset singleton after creating
Browse files Browse the repository at this point in the history
  • Loading branch information
nanaya committed Nov 15, 2024
1 parent 546f90c commit 77ff38a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions database/factories/CountryFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ class CountryFactory extends Factory
{
protected $model = Country::class;

public function configure(): static
{
return $this->afterCreating(fn () => app('countries')->resetMemoized());
}

public function definition(): array
{
return [
Expand Down

0 comments on commit 77ff38a

Please sign in to comment.