<?php
 namespace App\Http\Requests\Admin; use App\Models\TicketPredefinedReply; use Illuminate\Foundation\Http\FormRequest; class TicketPredefinedReplySearchRequest extends FormRequest { public function authorize(): bool { return $this->user()->can('viewAny', TicketPredefinedReply::class); } public function rules(): array { return [ 'q' => ['nullable', 'string', 'max:255'], 'department_id' => ['nullable', 'integer', 'exists:ticket_departments,id'], ]; } } 