Example #1
0
 /**
  * List food
  * @return type
  */
 public function actionIndex()
 {
     $page = Yii::$app->request->get('page', 1);
     $row_per_page = Yii::$app->request->get('row_per_page', 10);
     $keyword = Yii::$app->request->get('keyword', '');
     $food = new Category();
     list($max_page, $count, $data) = $food->getData($keyword, $page, $row_per_page);
     $router = 'category/index';
     return $this->render('index', ['max_page' => $max_page, 'count' => $count, 'row_per_page' => $row_per_page, 'page' => $page, 'data' => $data, 'router' => $router, 'keyword' => $keyword]);
 }