public function handle($request)
 {
     $member = Member::register($request->name, $request->email, $request->githubUrl, $request->githubId, $request->imageUrl);
     $this->memberRepository->save($member);
     $this->dispatcher->dispatch($member->releaseEvents());
     return new RegisterMemberResponse($member);
 }
示例#2
0
 public function handle($command)
 {
     $thread = $this->forum->addThread($command->subject, $command->body, $command->author, $command->isQuestion, $command->laravelVersion, $command->tagIds);
     $this->repository->save($thread);
     $this->dispatcher->dispatch($this->forum->releaseEvents());
     return $thread;
 }