/**
  * Execute the command.
  *
  * @param SubmissionRepositoryInterface $repository
  * @param Dispatcher $event
  */
 public function handle(SubmissionRepositoryInterface $repository, Dispatcher $event)
 {
     /**
      * Save the Winner
      */
     $repository->createWinner($this->submission->submissible, $this->submission->id);
     /**
      * Announce A SubmissionWinnerWasSelected
      */
     $event->fire(new SubmissionWinnerWasSelected($this->submission));
 }
 /**
  * Execute the command.
  *
  * @param SubmissionRepositoryInterface $repository
  * @param Dispatcher $event
  */
 public function handle(SubmissionRepositoryInterface $repository, Dispatcher $event)
 {
     /**
      * Vote on a Idea Submission
      */
     $repository->vote($this->amount, $this->submission->id, $this->user->id);
     /**
      * Announce a SubmissionReceivedAVote
      */
     $event->fire(new SubmissionReceivedAVote($this->amount, $this->submission, $this->user));
 }
예제 #3
0
 /**
  * Display the specified resource.
  *
  * @param Idea $idea
  * @param SubmissionRepositoryInterface $repository
  * @return \Illuminate\Http\Response
  * @internal param IdeaRepositoryInterface $IdeaRepository
  */
 public function show(\DreamsArk\Models\Project\Stages\Idea $idea, SubmissionRepositoryInterface $repository)
 {
     //        dd($idea->submissions->winner);
     $submissions = $repository->idea($idea)->allPublic();
     return view('project.idea.show')->with('idea', $idea)->with('submissions', $submissions);
 }