Skip to content
This repository has been archived by the owner on Sep 28, 2021. It is now read-only.

Commit

Permalink
Laravel unique validation for users needs column name not id
Browse files Browse the repository at this point in the history
  • Loading branch information
oranges13 committed Jul 1, 2019
1 parent 921e1f9 commit 4978955
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion application/app/Http/Controllers/UserController.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public function update($id)
$rules = array(
'name' => 'required|min:3|max:255',
'role' => 'required|numeric|role',
'email' => 'required|email|max:255|unique:users,'.$id,
'email' => 'required|email|max:255|unique:users,email',
'password' => 'confirmed|min:6'
);

Expand Down

0 comments on commit 4978955

Please sign in to comment.