diff --git a/app/Domain/Integrations/Models/IntegrationModel.php b/app/Domain/Integrations/Models/IntegrationModel.php index 0003495bd..ab8c318c0 100644 --- a/app/Domain/Integrations/Models/IntegrationModel.php +++ b/app/Domain/Integrations/Models/IntegrationModel.php @@ -203,7 +203,7 @@ public function keyVisibilityUpgrade(): HasOne /** * @return HasMany */ - public function udbOrganizers(): HasMany + public function organizers(): HasMany { return $this->hasMany(UdbOrganizerModel::class, 'integration_id'); } @@ -361,7 +361,7 @@ public function toDomain(): Integration ->map(fn (KeycloakClientModel $keycloakClientModel) => $keycloakClientModel->toDomain()) ->toArray() )->withUdbOrganizers( - ...$this->udbOrganizers() + ...$this->organizers() ->get() ->map(fn (UdbOrganizerModel $organizerModel) => $organizerModel->toDomain()) ->toArray() diff --git a/app/Nova/Resources/Integration.php b/app/Nova/Resources/Integration.php index 3ef53c7c6..61c83ce5b 100644 --- a/app/Nova/Resources/Integration.php +++ b/app/Nova/Resources/Integration.php @@ -222,7 +222,7 @@ function (Text $field, NovaRequest $request, FormData $formData) { } return array_merge($fields, [ - HasMany::make('UDB3 Organizers', 'organizers', UdbOrganizer::class) + HasMany::make('UDB3 Organizers', 'organizers', UdbOrganizerModel::class) ->canSee(function () { /** @var ?IntegrationModel $model */ $model = $this->model(); diff --git a/app/Nova/Resources/UdbOrganizer.php b/app/Nova/Resources/UdbOrganizerModel.php similarity index 86% rename from app/Nova/Resources/UdbOrganizer.php rename to app/Nova/Resources/UdbOrganizerModel.php index b34e697f1..fa087f5a0 100644 --- a/app/Nova/Resources/UdbOrganizer.php +++ b/app/Nova/Resources/UdbOrganizerModel.php @@ -12,11 +12,11 @@ use Laravel\Nova\Http\Requests\NovaRequest; /** - * @mixin UdbOrganizer + * @mixin UdbOrganizerModel */ -final class UdbOrganizer extends Resource +final class UdbOrganizerModel extends Resource { - public static string $model = UdbOrganizer::class; + public static string $model = UdbOrganizerModel::class; public static $title = 'organizer_id';