Updating update user form request that has a user entity

parent 478f1281
......@@ -8,10 +8,10 @@ class UpdateUserRequest extends FormRequest
{
public function rules()
{
$userId = $this->route()->parameter('users');
$user = $this->route()->parameter('user');
return [
'email' => "required|email|unique:users,email,{$userId}",
'email' => "required|email|unique:users,email,{$user->id}",
'first_name' => 'required',
'last_name' => 'required',
'password' => 'confirmed',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment