Skip to content

Commit f6266a9

Browse files
committed
fixed comment link
1 parent 07ec40f commit f6266a9

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

app/domain/Lio/Comments/CommentPresenter.php

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
<?php namespace Lio\Comments;
22

33
use McCool\LaravelAutoPresenter\BasePresenter;
4-
use App;
5-
6-
use Str;
4+
use App, Input, Str, Request;
75

86
class CommentPresenter extends BasePresenter
97
{
@@ -18,12 +16,17 @@ public function forumThreadUrl()
1816

1917
public function commentUrl()
2018
{
19+
$pagination = null;
2120
$slug = $this->resource->parent->slug;
2221

2322
if ( ! $slug) return '';
2423

24+
if( Input::has('page')) {
25+
$pagination = '?page=' . Input::get('page');
26+
}
27+
2528
$url = action('ForumController@getThread', [$slug->slug]);
26-
return $url . "#comment-{$this->id}";
29+
return $url . $pagination . "#comment-{$this->id}";
2730
}
2831

2932
public function child_count_label()

0 commit comments

Comments
 (0)