Пример #1
0
 public function actionOrder()
 {
     $links = \Yii::$app->request->post('links');
     $state = Link::sortUpdate($links);
     if ($state) {
         $out = ['msg' => Yii::t('app', 'FLASH_SUCCESS_SAVE'), 'type' => 'success'];
     } else {
         $out = ['msg' => Yii::t('app', 'FLASH_ERROR_SAVE'), 'type' => 'danger'];
     }
     echo json_encode($out);
     \Yii::$app->end();
 }