foreverglory/admin-bundle

Symfony AdminBundle

安装: 20

依赖: 0

建议: 0

安全: 0

星星: 0

关注者: 2

分支: 0

类型:symfony-bundle

dev-master 2016-07-21 04:43 UTC

This package is not auto-updated.

Last update: 2024-09-14 18:47:29 UTC


README

GloryAdminBundle 是基于 Symfony,利用 AdminLTE 前端开发的后台管理系统

使用

Composer

composer require foreverglory/admin-bundle

或者添加 composer.json 文件,之后执行 composer update

{
    require: {
        "foreverglory/theme-bundle": "dev-master"
    }
}

Kernel

//app/AppKernel.php
public function registerBundles()
{
    return array(
        // require bundles
        new Sp\BowerBundle\SpBowerBundle(),
        new Glory\Bundle\SettingBundle\GlorySettingBundle(),
        new Glory\Bundle\MenuBundle\GloryMenuBundle(),
        new Glory\Bundle\WebBundle\GloryWebBundle(),
        // core bundle
        new Glory\Bundle\AdminBundle\GloryAdminBundle(),
        // more ...
    );
}

配置

#app/config/config.yml
sp_bower:
    bundles:
        # 启用 bower 资源
        GloryAdminBundle: ~
glory_setting: ~
glory_menu: ~
glory_admin:
    # css,js资源,将替换默认
    stylesheets: ~
    javascripts: ~
    # 仪表盘配置
    dashboard:
        - { include: AppBundle:Block:analysis.html.twig }
        - { controller: AppBundle:Dashboard:calendar }
        # more ...
#app/config/routing.yml
glory_admin:
    resource: "@GloryAdminBundle/Resources/config/routing.yml"
    prefix:   /
#app/config/security.yml
security:
    access_control:
        - { path: ^/admin, role: ROLE_ADMIN }

数据

  • 安装 assetic
php app/console sp:bower:install
  • 安装菜单数据库
php app/console gloryadmin:install menu

享受使用吧