摘要: 一.GridView 在控制器 public function actionIndex() { $query = User::find(); $pages = new Pagination(['totalCount' =>$query->count()]); $dataProvider = new 阅读全文
posted @ 2021-05-19 17:25 狐槑芸芽 阅读(54) 评论(0) 推荐(0)
摘要: public function behaviors() { return [ 'access' => [ 'class' => AccessControl::className(), 'rules' => [ [ //当前rule将针对这里设置的action起作用,如果action不设置,默认当前控 阅读全文
posted @ 2021-05-13 10:20 狐槑芸芽 阅读(49) 评论(0) 推荐(0)
摘要: 在common/config/main-local.php配置 'components' = >[ // 配置缓存 'cache' => [ 'class' => 'yii\caching\FileCache', 'db' => [ 'class' => 'yii\db\Connection', ' 阅读全文
posted @ 2021-05-11 09:40 狐槑芸芽 阅读(54) 评论(0) 推荐(0)