/** * Execute the command. * * @param UserRepositoryInterface $repository * @param Dispatcher $event */ public function handle(UserRepositoryInterface $repository, Dispatcher $event) { /** * Create User */ $user = $repository->create($this->fields); /** * Announce UserWasCreated */ $event->fire(new UserWasCreated($user, $this->role)); }