user()->can('customers.create') || $this->user()->can('customers.update'); } public function rules(): array { $customer = $this->route('customer'); return [ 'name' => ['required', 'string', 'max:200', Rule::unique('customers', 'name')->ignore($customer)], 'phone_number' => ['nullable', 'string', 'max:20'], 'address' => ['nullable', 'string'], ]; } public function attributes(): array { return [ 'name' => 'nama', 'phone_number' => 'nomor telepon', 'address' => 'alamat', ]; } }