Ejemplo n.º 1
0
 /**
  * Displays the issue.
  *
  * @param int|string $id
  *
  * @return \Illuminate\View\View
  */
 public function show($id)
 {
     $with = ['comments', 'comments.revisions', 'comments.files', 'labels', 'revisions', 'files'];
     $issue = $this->issue->with($with)->findOrFail($id);
     $this->authorize('issues.show', [$issue]);
     $resolution = $issue->comments->first(function ($key, $comment) {
         return $comment->resolution;
     });
     $formComment = $this->presenter->formComment($issue);
     $formLabels = $this->presenter->formLabels($issue);
     $formUsers = $this->presenter->formUsers($issue);
     return view('pages.issues.show', compact('issue', 'resolution', 'formComment', 'formLabels', 'formUsers'));
 }