hecsedli / cakephp3adminlte
CakePHP 3.x AdminLTE 主题。基于 maiconpinto/cakephp-adminlte-theme
1.0.20
2020-03-19 09:34 UTC
Requires
- php: >=5.4.16
- cakephp/cakephp: ~3.0
Requires (Dev)
- phpunit/phpunit: ~4.1
This package is not auto-updated.
Last update: 2024-09-27 06:35:49 UTC
README
安装
您可以使用 composer 进行安装。
composer require hecsedli/cakephp3adminlte
启用插件
// config/bootstrap.php Plugin::load('AdminLTE', ['bootstrap' => true, 'routes' => true]);
启用主题
// src/Controller/AppController.php public function beforeRender(Event $event) { $this->viewBuilder()->theme('AdminLTE'); }
启用表单
// src/View/AppView.php public function initialize() { $this->loadHelper('Form', ['className' => 'AdminLTE.Form']); }
Bake
bin/cake bake model all -t AdminLTE
bin/cake bake controller all -t AdminLTE --actions index,indexAjax,add,edit,delete
bin/cake bake template all -t AdminLTE
菜单生成器
在 Bake 后使用。根据数据库表名生成侧边栏菜单。
bin/cake menu_generator
元素
src/Template/Plugin/AdminLTE/Element/nav-top.ctp
src/Template/Plugin/AdminLTE/Element/aside-main-sidebar.ctp
src/Template/Plugin/AdminLTE/Element/aside/user-panel.ctp
src/Template/Plugin/AdminLTE/Element/aside/form.ctp
src/Template/Plugin/AdminLTE/Element/aside/sidebar-menu.ctp
src/Template/Plugin/AdminLTE/Element/aside-control-sidebar.ctp
src/Template/Plugin/AdminLTE/Element/footer.ctp
页面调试
添加了指向 CakePHP 默认页面的链接。
贡献
- 分支
- 创建您的功能分支(
git checkout -b my-new-feature
) - 提交您的更改(
git commit -am 'Add some feature'
) - 推送到分支(
git push origin my-new-feature
) - 创建新的 Pull Request