<?php
namespace frontend\widgets;

use yii\base\Widget;

class Slider extends Widget
{
    public $title;

    public function init(){

        parent::init();

    }


    public function run()
    {


            $slider = \common\models\Slider::find()->where([\common\models\Slider::tableName().'.title'=>$this->title])->joinWith("sliderImage")->one();

            return $this->render('slider',[
                'slider'=>$slider
            ]);


    }

}