25 lines
583 B
PHP
25 lines
583 B
PHP
<?php
|
|
|
|
namespace App\Http\Requests;
|
|
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
|
|
class StoreBookingRequest extends FormRequest
|
|
{
|
|
public function authorize(): bool
|
|
{
|
|
return true;
|
|
}
|
|
|
|
public function rules(): array
|
|
{
|
|
return [
|
|
'amount' => ['required', 'numeric', 'min:0.01'],
|
|
'type' => ['required', 'in:debit,credit'],
|
|
'description' => ['nullable', 'string', 'max:255'],
|
|
'booked_at' => ['nullable', 'date'],
|
|
'payment_id' => ['nullable', 'integer', 'exists:payments,id'],
|
|
];
|
|
}
|
|
}
|