thefx / yii2-blocks
块
1.0.0
2023-04-21 06:53 UTC
Requires
- php: >=7.1.0
- 2amigos/yii2-transliterator-helper: *
- almasaeed2010/adminlte: ^3.1.0
- intervention/image: ^2.5
- la-haute-societe/yii2-save-relations-behavior: ^1.2
- paulzi/yii2-nested-sets: ^1.0
- select2/select2: >=4.0
- thefx/yii2-user: dev-master
- thefx/yii2-widgets-cropper: dev-master
- vova07/yii2-imperavi-widget: *
- yiisoft/yii2: ~2.0.5
- yiisoft/yii2-jui: ~2.0.0
Requires (Dev)
- roave/security-advisories: dev-latest
This package is auto-updated.
Last update: 2024-09-11 08:22:08 UTC
README
安装
安装此扩展的首选方式是通过 composer.
composer require thefx/yii2-blocks:dev-master
或者
"thefx/yii2-blocks": "dev-master"
将以下内容添加到您的 composer.json
文件的 require 部分。
应用迁移
php yii migrate --migrationPath=@thefx/blocks/migrations
修改您的应用程序配置
return [
'modules' => [
'blocks' => [
'class' => 'thefx\blocks\Module',
'layoutPath' => '@app/modules/admin/layouts',
'layout' => 'page',
'layoutPure' => 'pure',
'rootUsers' => [1],
...
]
...
],
];
仅对认证用户添加访问权限
'as access blocks' => [
'class' => 'yii\filters\AccessControl',
'only' => ['pages/*', 'blocks/*'],
'rules' => [
[
'allow' => true,
'roles' => ['@'],
],
],
],
使用方法
创建块
http://site.com/blocks/block