<?php
 namespace App\Http\Requests\Admin; use Illuminate\Foundation\Http\FormRequest; class InvoiceBillingRecordsRequest extends FormRequest { public function authorize(): bool { return $this->user()->can('viewAny', \App\Models\InvoiceBilling::class); } public function rules(): array { return [ 'type' => 'nullable|string|in:e-invoice,e-archive', 'status' => 'nullable|string|in:active,inactive,error', 'is_active' => 'nullable|boolean', 'is_automatic' => 'nullable|boolean', 'draw' => 'required|integer', 'start' => 'required|integer|min:0', 'length' => 'required|integer|min:1|max:100', 'order' => 'nullable|array', 'order.*.column' => 'required_with:order|integer|min:0', 'order.*.dir' => 'required_with:order|in:asc,desc', ]; } } 