26 lines
579 B
PHP
26 lines
579 B
PHP
<?php declare(strict_types=1);
|
|
|
|
namespace App\Http\Requests\Private\Profile;
|
|
|
|
use App\Contracts\FormRequestDto;
|
|
use App\Dto\Request\Private\Profile\Update;
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
|
|
final class UpdateRequest extends FormRequest implements FormRequestDto
|
|
{
|
|
/**
|
|
* Get the validation rules that apply to the request.
|
|
*/
|
|
public function rules(): array
|
|
{
|
|
return [
|
|
'name' => ['required', 'max:255'],
|
|
];
|
|
}
|
|
|
|
public function getDto(): Update
|
|
{
|
|
return new Update(name: $this->input('name'));
|
|
}
|
|
}
|