Example #1
0
 public function actionIndex()
 {
     $this->checkLogin();
     $this->layout = 'admin';
     $modelOrder = new Order();
     $orders = $modelOrder->getAll();
     return $this->render('index', ['orders' => $orders]);
 }
Example #2
0
 public function actionTest()
 {
     $orders = Order::getAll();
     return $this->render("test", ["orders" => $orders]);
 }
Example #3
0
<?php

/* @var $this yii\web\View */
use app\models\Order;
use yii\data\ArrayDataProvider;
use yii\widgets\ListView;
$this->title = 'Заказы';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="site-about">
    <h1>Заказы</h1>

    <?php 
$dataProvider = new ArrayDataProvider(['allModels' => Order::getAll(), 'pagination' => ['pageSize' => 20]]);
echo ListView::widget(['dataProvider' => $dataProvider, 'itemView' => '_post']);
?>

</div>
Example #4
0
 public function actionIndex()
 {
     $orders = Order::getAll();
     return $this->render('index', ['orders' => $orders]);
 }