コード例 #1
0
 /**
  * Handle the command.
  *
  * @param $command
  *
  * @return \Tectonic\Shift\Modules\Identity\Users\Models\User
  */
 public function handle($command)
 {
     $user = User::register($command->firstName, $command->lastName, $command->email, $command->password);
     $this->userRepository->save($user);
     $account = CurrentAccount::get();
     $account->addUser($user);
     $this->eventDispatcher->dispatch($user->releaseEvents());
     return $user;
 }