hecsedli / cakephp3adminlte

CakePHP 3.x AdminLTE 主题。基于 maiconpinto/cakephp-adminlte-theme

安装: 337

依赖者: 0

建议者: 0

安全: 0

星标: 0

关注者: 1

分支: 111

语言:JavaScript

类型:cakephp 插件

1.0.20 2020-03-19 09:34 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

元素

Dashboard

  1. src/Template/Plugin/AdminLTE/Element/nav-top.ctp
  2. src/Template/Plugin/AdminLTE/Element/aside-main-sidebar.ctp
  3. src/Template/Plugin/AdminLTE/Element/aside/user-panel.ctp
  4. src/Template/Plugin/AdminLTE/Element/aside/form.ctp
  5. src/Template/Plugin/AdminLTE/Element/aside/sidebar-menu.ctp
  6. src/Template/Plugin/AdminLTE/Element/aside-control-sidebar.ctp
  7. src/Template/Plugin/AdminLTE/Element/footer.ctp

页面调试

添加了指向 CakePHP 默认页面的链接。

Page debug

贡献

  1. 分支
  2. 创建您的功能分支(git checkout -b my-new-feature
  3. 提交您的更改(git commit -am 'Add some feature'
  4. 推送到分支(git push origin my-new-feature
  5. 创建新的 Pull Request