27 lines
709 B
PHP
27 lines
709 B
PHP
<?php
|
|
|
|
namespace App\Http\Requests;
|
|
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
|
|
class StoreAppointmentRequest extends FormRequest
|
|
{
|
|
public function authorize(): bool
|
|
{
|
|
return true;
|
|
}
|
|
|
|
public function rules(): array
|
|
{
|
|
return [
|
|
'patient_id' => ['required', 'exists:patients,id'],
|
|
'therapist_id' => ['required', 'exists:users,id'],
|
|
'appointment_date' => ['required', 'date'],
|
|
'duration_minutes' => ['required', 'integer', 'min:15'],
|
|
'type' => ['nullable', 'in:session,assessment,follow-up'],
|
|
'room' => ['nullable', 'string', 'max:50'],
|
|
'notes' => ['nullable', 'string'],
|
|
];
|
|
}
|
|
}
|