From 1b06762d353879efe754d967d5f64454db0531f2 Mon Sep 17 00:00:00 2001 From: Anastasia Date: Tue, 8 May 2018 14:05:17 +0300 Subject: [PATCH] - events - background in slider --- common/models/event/Tag.php | 2 +- frontend/controllers/EventController.php | 2 +- frontend/views/site/index.php | 4 ++-- frontend/web/js/front.js | 8 +++++++- 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/common/models/event/Tag.php b/common/models/event/Tag.php index d9e3f75..e414fce 100755 --- a/common/models/event/Tag.php +++ b/common/models/event/Tag.php @@ -116,7 +116,7 @@ /** * @return \yii\db\ActiveQuery */ - public function getArticles() + public function getEvents() { return $this->hasMany(Event::className(), [ 'id' => 'event_id' ]) ->viaTable('event_to_tag', [ 'event_tag_id' => 'id' ]); diff --git a/frontend/controllers/EventController.php b/frontend/controllers/EventController.php index 344fe26..eba46f4 100755 --- a/frontend/controllers/EventController.php +++ b/frontend/controllers/EventController.php @@ -98,7 +98,7 @@ ) ->with( [ - 'articles', + 'events', ] ) ->one(); diff --git a/frontend/views/site/index.php b/frontend/views/site/index.php index ce28809..e46b9fb 100755 --- a/frontend/views/site/index.php +++ b/frontend/views/site/index.php @@ -16,7 +16,7 @@ -