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.
28 lines
742 B
PHP
28 lines
742 B
PHP
<?php
|
|
|
|
namespace App\Http\Requests\Admin\Manage\Finance;
|
|
|
|
use App\Enums\PaymentStatus;
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
use Illuminate\Validation\Rule;
|
|
|
|
class TuitionPaymentRequest extends FormRequest
|
|
{
|
|
public function authorize(): bool
|
|
{
|
|
return true;
|
|
}
|
|
|
|
public function rules(): array
|
|
{
|
|
return [
|
|
'amount_paid' => ['required', 'numeric', 'min:0'],
|
|
'paid_at' => ['required', 'date'],
|
|
'payment_method' => ['nullable', 'string', 'max:30'],
|
|
'status' => ['required', Rule::enum(PaymentStatus::class)],
|
|
'notes' => ['nullable', 'string'],
|
|
'proof' => ['nullable', 'file', 'max:10240', 'mimes:pdf,jpg,jpeg,png'],
|
|
];
|
|
}
|
|
}
|