tests pass!

This commit is contained in:
2025-04-07 19:06:37 +01:00
parent a5854c7a04
commit e8c8eeab18
8 changed files with 33 additions and 27 deletions

View File

@@ -3,6 +3,7 @@
namespace Database\Factories;
use App\Enums\ProviderType;
use App\Models\Organisation;
use Illuminate\Database\Eloquent\Factories\Factory;
/**
@@ -26,10 +27,10 @@ class ProviderFactory extends Factory
];
}
public function forOrganisation($organisationId): static
public function forOrganisation(string|Organisation $organisation): static
{
return $this->state(fn (array $attributes) => [
'organisation_id' => $organisationId,
'organisation_id' => is_string($organisation) ? $organisation : $organisation->id,
]);
}
}