inti project
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
namespace App\Http\Requests\Students;
|
||||
use App\Domain\SchoolCore\Students\DTO\UpdateStudentData;
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
final class UpdateStudentRequest extends FormRequest { public function authorize(): bool { return true; } public function rules(): array { return []; } public function toDTO(): UpdateStudentData { return new UpdateStudentData(firstName:$this->input('first_name'), lastName:$this->input('last_name'), middleName:$this->input('middle_name'), preferredName:$this->input('preferred_name'), dateOfBirth:$this->input('date_of_birth'), gender:$this->input('gender'), primaryLanguage:$this->input('primary_language'), profileMetadata:(array)$this->input('profile_metadata',[]), updateReason:(string)$this->input('update_reason','student update')); } }
|
||||
Reference in New Issue
Block a user