Blame view

frontend/controllers/GalleryController.php 526 Bytes
c4d70d93   Anastasia   - blog
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
  <?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
              ]);
          }
      }