getUserForUpdate(); return [ 'email' => 'required|email|unique:users,email,' . $user->id, 'username' => 'nullable|unique:users,username,' . $user->id, 'password' => 'nullable|min:8|confirmed' ]; } /** * @return \Illuminate\Routing\Route|object|string */ protected function getUserForUpdate() { return $this->route('user'); } }