public function handle($command)
 {
     $thread = $this->forum->markThreadUnsolved($command->thread);
     $this->repository->save($thread);
     $this->dispatcher->dispatch($this->forum->releaseEvents());
     return $thread;
 }
예제 #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;
 }
예제 #3
0
 public function getIndex()
 {
     $user = $this->auth->user();
     $threads = $this->threadRepository->getRecentByMember($user);
     $replies = $this->replyRepository->getRecentByMember($user);
     $this->render('dashboard.index', compact('user', 'threads', 'replies'));
 }
예제 #4
0
 public function handle($command)
 {
     $thread = $this->forum->deleteThread($command->thread);
     $this->repository->delete($thread);
     $this->dispatcher->dispatch($this->forum->releaseEvents());
     return $thread;
 }