GalleryController.php 526 Bytes
<?php
    /**
     * Created by PhpStorm.
     * User: stes
     * Date: 07.05.18
     * Time: 17:08
     */
    
    namespace frontend\controllers;
    
    use common\models\Gallery;
    use yii\web\Controller;

    class GalleryController extends Controller
    {
        public function actionIndex(){
            $images = Gallery::find()->with('language')->where(['status' => true])->orderBy('sort')->all();
            return $this->render('index', [
                'images' => $images
            ]);
        }
    }