update api and add more features
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Finance;
|
||||
|
||||
use App\Http\Requests\ApiFormRequest;
|
||||
|
||||
class FeeTuitionBreakdownRequest extends ApiFormRequest
|
||||
{
|
||||
public function authorize(): bool
|
||||
{
|
||||
return $this->user() !== null;
|
||||
}
|
||||
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'students' => ['required', 'array', 'min:1'],
|
||||
'students.*.student_id' => ['nullable', 'integer', 'min:1'],
|
||||
'students.*.firstname' => ['nullable', 'string', 'max:100'],
|
||||
'students.*.lastname' => ['nullable', 'string', 'max:100'],
|
||||
'students.*.class_section_id' => ['nullable', 'integer', 'min:1'],
|
||||
'students.*.grade' => ['nullable', 'string', 'max:20'],
|
||||
'students.*.enrollment_status' => ['nullable', 'string', 'max:50'],
|
||||
'students.*.admission_status' => ['nullable', 'string', 'max:50'],
|
||||
'students.*.discount_amount' => ['nullable', 'numeric', 'min:0'],
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user