Some checks failed
tests / ci (pull_request) Has been cancelled
- Implemented StudentService to retrieve all students for selection. - Created migration for tuition_invoices and tuition_payments tables. - Added seeders for TuitionInvoice and TuitionPayment with sample data. - Updated DatabaseSeeder to include new seeders. - Developed UI components for managing tuition invoices and payments, including forms and data tables. - Introduced RupiahInput component for formatted currency input. - Added routes for tuition invoices and payments management. - Defined TypeScript types for tuition invoices and payments.
28 lines
734 B
PHP
28 lines
734 B
PHP
<?php
|
|
|
|
namespace App\Http\Requests\Admin\Manage;
|
|
|
|
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'],
|
|
];
|
|
}
|
|
}
|