Skip to content

Commit f46fab4

Browse files
committed
fixed wrong npm build error, update support for postgres
1 parent 7ce9ab1 commit f46fab4

File tree

5 files changed

+7
-896
lines changed

5 files changed

+7
-896
lines changed

app/Http/Requests/Auth/RoleInsertUpdateRequest.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace App\Http\Requests\Auth;
44

55
use Illuminate\Foundation\Http\FormRequest;
6+
use Illuminate\Validation\Rule;
67

78
class RoleInsertUpdateRequest extends FormRequest
89
{
@@ -23,7 +24,9 @@ public function rules(): array
2324
{
2425
$validations = [
2526
'id' => 'required|exists:roles,id',
26-
'name' => 'required|string|max:20|unique:roles,name,'.$this->id.',id',
27+
// 'name' => 'required|string|max:20|unique:roles,name,'.$this->id.',id',
28+
'name' => Rule::unique('roles', 'name')->ignore((int) $this->id, 'id'),
29+
2730
'permissions' => 'nullable|array|min:1',
2831
'permissions.*' => 'nullable|exists:permissions,id',
2932
];

0 commit comments

Comments
 (0)