has('amount')) { $this->merge([ 'amount' => str_replace('.', '', $this->amount), ]); } } public function rules(): array { return [ 'amount' => ['required', 'integer', 'min:1'], 'description' => ['required', 'string', 'max:100'], 'receipt_key' => ['nullable', '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', ]; } }