diff --git a/app/Models/Content.php b/app/Models/Content.php index 6dee27a4..a91de453 100644 --- a/app/Models/Content.php +++ b/app/Models/Content.php @@ -62,6 +62,7 @@ class Content extends Model { return Content::where('status', '!=', Content::STATUS_DRAFT) ->select('contents.*') + ->with('author') ->join('modules', 'modules.handler', '=', 'contents.module_handler') ->where('language', LaravelLocalization::getCurrentLocale()) ->where('modules.enabled', true); diff --git a/modules/Blog/Article/Handlers/Article.php b/modules/Blog/Article/Handlers/Article.php index bc5481b9..44f4a1f9 100644 --- a/modules/Blog/Article/Handlers/Article.php +++ b/modules/Blog/Article/Handlers/Article.php @@ -27,6 +27,7 @@ class Article extends Handler implements ContentTitles $content->comments = []; if (isset($content->module_settings->allowComments) && $content->module_settings->allowComments) { $content->comments = Comment::where('content_id', $content->id) + ->with('author') ->where('approved', 1) ->orderBy('created_at') ->get();