Some checks failed
tests / ci (pull_request) Has been cancelled
- Created sub-namespaces under Admin\Manage for Course, Academic, Announcement, Finance, and Service. - Added new FormRequest classes for handling validation in each sub-namespace. - Implemented Service classes for managing business logic related to each resource. - Updated routes to reflect the new sub-namespace structure. - Enhanced code organization and maintainability by grouping related functionalities.
25 lines
626 B
PHP
25 lines
626 B
PHP
<?php
|
|
|
|
namespace App\Http\Requests\Admin\Manage\Finance;
|
|
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
use Illuminate\Validation\Rule;
|
|
|
|
class TuitionInvoiceRequest extends FormRequest
|
|
{
|
|
public function authorize(): bool
|
|
{
|
|
return true;
|
|
}
|
|
|
|
public function rules(): array
|
|
{
|
|
return [
|
|
'student_id' => ['required', 'integer', Rule::exists('students', 'id')],
|
|
'academic_term_id' => ['required', 'integer', Rule::exists('academic_terms', 'id')],
|
|
'amount_due' => ['required', 'numeric', 'min:0'],
|
|
'due_date' => ['nullable', 'date'],
|
|
];
|
|
}
|
|
}
|