From b70e13213efe4a70a6a2b97d92b663530035125a Mon Sep 17 00:00:00 2001 From: Vitaliy Date: Thu, 30 Jun 2016 12:47:54 +0300 Subject: [PATCH] 30.06.16 event images --- common/models/Event.php | 4 ++++ 1 file changed, 4 insertions(+), 0 deletions(-) diff --git a/common/models/Event.php b/common/models/Event.php index d091c63..3357b35 100755 --- a/common/models/Event.php +++ b/common/models/Event.php @@ -99,4 +99,8 @@ class Event extends \yii\db\ActiveRecord 'end_at' => Yii::t('app', 'end_at'), ]; } + + public function getImageUrl() { + return empty($this->image) ? null : '/storage/slider/'. $this->image; + } } -- libgit2 0.21.4