FEATURE: merge template namespace and module alias
This commit is contained in:
@@ -11,6 +11,7 @@ use App\Models\ActionLog\ActionLogType;
|
||||
use App\Models\Content\Content;
|
||||
use App\Models\Module;
|
||||
use App\Models\User;
|
||||
use Illuminate\Support\Collection;
|
||||
use Modules\Blog\Article\Entities\Comment;
|
||||
|
||||
class Article extends Handler implements ContentTitles, AdvancedContentModifier, InstallableModule
|
||||
@@ -25,8 +26,8 @@ class Article extends Handler implements ContentTitles, AdvancedContentModifier,
|
||||
*/
|
||||
public function render(Content $content, $parameters)
|
||||
{
|
||||
$content->comments = [];
|
||||
if (isset($content->moduleSettings->allowComments) && $content->moduleSettings->allowComments) {
|
||||
$content->comments = new Collection();
|
||||
if (isset($content->moduleSettings['allowComments']) && $content->moduleSettings['allowComments']) {
|
||||
$content->comments = Comment::where('content_id', $content->id)
|
||||
->with('author')
|
||||
->where('approved', 1)
|
||||
|
||||
Reference in New Issue
Block a user