<?php
 namespace App\Http\Requests\Admin; use App\Models\CancellationRequest; use Illuminate\Foundation\Http\FormRequest; class CancellationRequestRecordsRequest extends FormRequest { public function authorize(): bool { return $this->user()->can('viewAny', CancellationRequest::class); } public function rules(): array { return [ 'draw' => 'required|integer', 'start' => 'required|integer|min:0', 'length' => 'required|integer|min:1|max:100', 'search' => 'nullable|array', 'search.value' => 'nullable|string', 'order' => 'nullable|array', 'order.*.column' => 'required_with:order|integer', 'order.*.dir' => 'required_with:order|in:asc,desc', ]; } } 