|
@@ 93-95 (lines=3) @@
|
| 90 |
|
$query = CommentPost::where('pathway', '=', $path); |
| 91 |
|
|
| 92 |
|
// check if comments is depend of language locale |
| 93 |
|
if ((int)$configs['onlyLocale'] === 1) { |
| 94 |
|
$query = $query->where('lang', '=', App::$Request->getLanguage()); |
| 95 |
|
} |
| 96 |
|
|
| 97 |
|
// get comments with offset and limit |
| 98 |
|
$records = $query->skip($offset) |
|
@@ 152-154 (lines=3) @@
|
| 149 |
|
|
| 150 |
|
// get data from db by comment id |
| 151 |
|
$records = CommentAnswer::where('comment_id', '=', $commentId); |
| 152 |
|
if ((int)$configs['onlyLocale'] === 1) { |
| 153 |
|
$records = $records->where('lang', '=', App::$Request->getLanguage()); |
| 154 |
|
} |
| 155 |
|
|
| 156 |
|
// check objects count |
| 157 |
|
if ($records->count() < 1) { |