<?php
 namespace App\Http\Requests\Admin; use Illuminate\Foundation\Http\FormRequest; class ClientBalanceIndexRequest extends FormRequest { public function authorize(): bool { return $this->user()->can('viewAny', \App\Models\ClientBalance::class); } public function rules(): array { return [ 'search' => 'nullable|string|max:255', 'client_id' => 'nullable|integer|exists:clients,id', 'currency_id' => 'nullable|integer|exists:currencies,id', 'status' => 'nullable|string|in:positive,negative,zero', ]; } public function messages(): array { return [ 'client_id.exists' => 'Seçilen müşteri bulunamadı.', 'currency_id.exists' => 'Seçilen para birimi bulunamadı.', 'status.in' => 'Geçersiz bakiye durumu.', ]; } } 