芝麻web文件管理V1.00
编辑当前文件:/home2/sdektunc/xmintal-back/controllers/CustomerController.php
'yii\data\ActiveDataFilter', 'searchModel'=>(new DynamicModel(['name']))->addRule(['name'],'string') ]; return $actions; } public function serializeData($data){ $result=parent::serializeData($data); if($this->action->id=='view'){ $catalogs=$this->getCatalogs(); $result['licenses']=$catalogs['licenses']; } return $result; } private function getCatalogs(){ $licenses=License::find()->where(['active'=>1,'trash'=>0])->all(); return ['licenses'=>$licenses]; } public function actionCatalogs(){ return $this->getCatalogs(); } } ?>