21 lines
529 B
PHP
21 lines
529 B
PHP
<?php
|
|
|
|
namespace Modules\DomainFluctuation\App\Http\Requests;
|
|
|
|
use Modules\DomainFluctuation\App\DTOs\DomainFluctuationDTO;
|
|
|
|
class UpdateDomainFluctuationRequest extends StoreDomainFluctuationRequest
|
|
{
|
|
public function rules(): array
|
|
{
|
|
return array_merge(parent::rules(), [
|
|
'term_id' => ['sometimes', 'integer', 'exists:domain_fluctuation_terms,id'],
|
|
]);
|
|
}
|
|
|
|
public function toDTO(): DomainFluctuationDTO
|
|
{
|
|
return DomainFluctuationDTO::fromArray($this->validated());
|
|
}
|
|
}
|