/** * Handle the command. * * @param $command */ public function handle($command) { $user = $this->userRepository->requireBySlug($command->slug); $user->edit($command->firstName, $command->lastName, $command->email, $command->password); $this->userRepository->save($user); $this->dispatcher->dispatch($user->releaseEvents()); }
/** * Retrieve a single user based on their slug. * * @Get("users/{slug}", middleware={"shift.account", "shift.auth"}, as="users.show") * * @param $slug * @return array */ public function getShow($slug) { $user = $this->userRepository->requireBySlug($slug); return $this->respond('shift::users.edit', compact('user')); }