ldc-nature-and-respect/app/Http/Requests/Bo/Ranges/UpdateRangeRequest.php

25 lines
512 B
PHP
Raw Permalink Normal View History

2023-03-20 10:47:44 +01:00
<?php
namespace App\Http\Requests\Bo\Ranges;
use CodeZero\UniqueTranslation\UniqueTranslationRule;
2023-03-20 10:47:44 +01:00
class UpdateRangeRequest extends StoreRangeRequest
{
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules(): array
{
$rules = [
'slug' => UniqueTranslationRule::for('ranges')->ignore($this->range->id),
];
return \array_merge(
parent::rules(),
$rules,
);
}
2023-03-20 10:47:44 +01:00
}