Fixed api docs

This commit is contained in:
Constantin Graf
2024-06-27 17:11:23 +02:00
committed by Gregor Vostrak
parent de1accba4a
commit c3a7ef7585
5 changed files with 9 additions and 4 deletions

View File

@@ -25,6 +25,7 @@ class ClientUpdateRequest extends FormRequest
public function rules(): array
{
return [
// Name of the client
'name' => [
'required',
'string',
@@ -33,7 +34,7 @@ class ClientUpdateRequest extends FormRequest
(new UniqueEloquent(Client::class, 'name', function (Builder $builder): Builder {
/** @var Builder<Client> $builder */
return $builder->whereBelongsTo($this->organization, 'organization');
}))->ignore($this->client->getKey())->withCustomTranslation('validation.client_name_already_exists'),
}))->ignore($this->client?->getKey())->withCustomTranslation('validation.client_name_already_exists'),
],
'is_archived' => [
'boolean',