/**
  * Displays the form to edit the specified issue comment.
  *
  * @param int|string $id
  * @param int|string $commentId
  *
  * @return \Illuminate\View\View
  */
 public function edit($id, $commentId)
 {
     $issue = $this->issue->findOrFail($id);
     $comment = $issue->comments()->with(['files'])->findOrFail($commentId);
     $this->authorize('comments.edit', [$comment]);
     $form = $this->presenter->form($issue, $comment);
     return view('pages.issues.comments.edit', compact('form'));
 }
Beispiel #2
0
 /**
  * Returns a new issue comment form.
  *
  * @param Issue $issue
  *
  * @return \Orchestra\Contracts\Html\Builder
  */
 public function formComment(Issue $issue)
 {
     $presenter = new IssueCommentPresenter($this->form, $this->table);
     return $presenter->form($issue, new Comment());
 }