code: public function update($request, $id)
      {
          $data = $request->except('password', 'password_confirmation');
          if ($request->has('password')) {
              $data['password'] = $request->get('password');
              $data['password_confirmation'] = $request->get('password_confirmation');
          }
          $user = $this->repository->update($data, $id);
          $event_class = "Acoustep\EntrustGui\Events\\".ucwords($this->getModelName()).'UpdatedEvent';
          $event = new $event_class;
          $this->dispatcher->fire($event->setModel($user));
          return $user;
      }
docs: Update user
  
  @param Illuminate\Http\Request $request
  @param integer $id
  
  @return Illuminate\Database\Eloquent\Model