user()->can('cash.deposit') || $this->user()->can('cash.withdraw'); } #[Override] public function prepareForValidation(): void { $this->merge($this->stripCurrencyDot($this->all(), 'amount')); } public function rules(): array { return [ 'amount' => ['required', 'integer', 'min:1'], 'description' => ['required', 'string', 'max:100'], 'receipt_key' => ['required', 'string', 'max:500'], 'file_size' => ['nullable', 'integer', 'min:1'], 'file_mime_type' => ['nullable', 'string', 'in:image/jpeg,image/png,image/webp,image/gif'], ]; } public function attributes(): array { return [ 'amount' => 'jumlah', 'description' => 'keterangan', 'receipt_key' => 'bukti', 'file_size' => 'ukuran file', 'file_mime_type' => 'tipe file', ]; } }