diff --git a/frontend/controllers/BlogController.php b/frontend/controllers/BlogController.php index 2f2088b..76fbee6 100755 --- a/frontend/controllers/BlogController.php +++ b/frontend/controllers/BlogController.php @@ -22,7 +22,7 @@ ->with('lang.alias') ->with('image') ->with('tags.lang.alias') - ->with('category.lang.alias') + ->with('categories.lang.alias') ->where([ 'status' => true ]); $dataProvider = new ActiveDataProvider( @@ -54,10 +54,11 @@ ->with('image') ->with('tags.lang.alias') ->innerJoinWith('category') - ->with('category.lang.alias') + ->with('categories.lang.alias') ->where([ 'blog_category_id' => $id ]); $category = Category::find() + ->where([ 'id' => $id ]) ->with('lang') ->one(); @@ -99,7 +100,7 @@ $query = Article::find() ->with('lang.alias') ->with('image') - ->with('category.lang.alias') + ->with('categories.lang.alias') ->innerJoinWith('tags.lang.alias') ->where([ 'blog_tag_id' => $id ]) ->where([ 'blog_article.status' => true ]); diff --git a/frontend/views/blog/_article.php b/frontend/views/blog/_article.php index 6d2a097..0f3302f 100755 --- a/frontend/views/blog/_article.php +++ b/frontend/views/blog/_article.php @@ -18,19 +18,19 @@ ) ?>">= $model->lang->title ?>