add controllers, servoices
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Reimbursements;
|
||||
|
||||
use App\Http\Requests\ApiFormRequest;
|
||||
|
||||
class ReimbursementStoreRequest extends ApiFormRequest
|
||||
{
|
||||
public function authorize(): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'amount' => ['required', 'numeric', 'gt:0'],
|
||||
'reimbursed_to' => ['required', 'integer', 'min:1'],
|
||||
'reimbursement_method' => ['required', 'in:Cash,Check'],
|
||||
'check_number' => ['required_if:reimbursement_method,Check', 'nullable', 'string', 'max:50'],
|
||||
'receipt' => ['required_if:reimbursement_method,Check', 'nullable', 'file', 'max:2048', 'mimes:jpg,jpeg,png,webp,gif,pdf'],
|
||||
'expense_id' => ['nullable', 'integer', 'min:1'],
|
||||
'description' => ['nullable', 'string'],
|
||||
'school_year' => ['nullable', 'string', 'max:20'],
|
||||
'semester' => ['nullable', 'string', 'max:20'],
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user