From d6f535d5318519f06bf8b0502cb97be36e570ea0 Mon Sep 17 00:00:00 2001 From: Mohammad Hafijul Islam Date: Thu, 9 Nov 2023 00:28:04 +0600 Subject: [PATCH] LP-12 role update unique value fixed --- src/Http/Requests/UpdateRoleRequest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Http/Requests/UpdateRoleRequest.php b/src/Http/Requests/UpdateRoleRequest.php index f39e882..5139e99 100644 --- a/src/Http/Requests/UpdateRoleRequest.php +++ b/src/Http/Requests/UpdateRoleRequest.php @@ -23,7 +23,7 @@ public function authorize(): bool */ public function rules(): array { - $uniqueRule = 'unique:' . config('fintech.auth.role_model', Role::class) . ',name,' . $this->route('role'); + $uniqueRule = 'unique:' . config('fintech.auth.role_model', Role::class) . ',name,' . $this->route('role').',id,deleted_at,NULL'; return [ 'name' => ['required', 'string', 'min:5', 'max:255', $uniqueRule],