add all controllers logic
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\ClassPreparation;
|
||||
|
||||
use App\Http\Requests\ApiFormRequest;
|
||||
|
||||
class ClassPreparationPrintRequest extends ApiFormRequest
|
||||
{
|
||||
public function authorize(): bool
|
||||
{
|
||||
return $this->user() !== null;
|
||||
}
|
||||
|
||||
protected function prepareForValidation(): void
|
||||
{
|
||||
parent::prepareForValidation();
|
||||
|
||||
$this->merge([
|
||||
'class_section_id' => $this->route('classSectionId'),
|
||||
'school_year' => $this->route('schoolYear'),
|
||||
]);
|
||||
}
|
||||
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'class_section_id' => ['required', 'string', 'max:32'],
|
||||
'school_year' => ['required', 'string', 'max:9'],
|
||||
'semester' => ['nullable', 'string', 'max:255'],
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user