@ -44,6 +44,8 @@ class CommentController extends Controller
*/
public function update(Request $request, Issue $issue, Comment $comment)
{
$this->authorize('update', $comment);
$commentData = $request->validate([
'body' => 'required|string|max:255',
]);
@ -45,7 +45,7 @@
</td>
</tr>
@empty
<tr><td colspan="6">{{ __('issue.empty') }}</td></tr>
<tr><td colspan="7">{{ __('issue.empty') }}</td></tr>
@endforelse
</tbody>
</table>
@ -5,7 +5,9 @@
<strong>{{ $comment->creator->name }}</strong>
</legend>
<div class="pull-right">
@can('update', $comment)
{{ link_to_route('projects.issues.show', __('app.edit'), [$project, $issue, 'action' => 'comment-edit', 'comment_id' => $comment->id], ['id' => 'edit-comment-'.$comment->id, 'class' => 'small', 'title' => __('comment.edit')]) }}
@endcan
</div>
{!! nl2br($comment->body) !!}