24 lines
619 B
PHP
24 lines
619 B
PHP
<?php
|
|
|
|
namespace App\Http\Requests;
|
|
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
|
|
class StoreAssignmentRequest extends FormRequest
|
|
{
|
|
public function authorize(): bool
|
|
{
|
|
return true;
|
|
}
|
|
|
|
public function rules(): array
|
|
{
|
|
return [
|
|
'student_id' => ['required', 'integer', 'exists:students,id'],
|
|
'class_section_id' => ['required', 'integer', 'exists:class_sections,id'],
|
|
'semester' => ['required', 'string', 'max:50'],
|
|
'school_year' => ['required', 'string', 'max:50'],
|
|
'description' => ['nullable', 'string'],
|
|
];
|
|
}
|
|
} |