定制 skoro/yii2-admin-template 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

skoro/yii2-admin-template

Composer 安装命令:

composer create-project skoro/yii2-admin-template

包简介

Yii 2 project template for backend projects

README 文档

README

Yii 2 Admin Project Template is a skeleton Yii 2 application best for rapidly creating admin backends projects.

Features:

  • Application files in its folder.
  • AdminLTE theme imported
  • User schema and user login/register/profile/passwords forms.
  • AdminLTE specific widgets exposed as Yii2 widgets:
    • Box (with expanded/collapsed state)
    • Tabs
    • Select2
    • GridView
    • ProgressBar (vertical/horizontal)
    • Popup notifications.
    • ItemList (wrapper for nice AdminLTE lists)
    • TimePicker
    • Timeline
    • TypeAhead (bootstrap version from @bower/typeahead.js)

Screenshot

DIRECTORY STRUCTURE

bin/   contains command line utilities
app/   contains your application 
      assets/         contains assets definition
      base/           contains base classes
      commands/       contains console commands (controllers)
      components/     contains various components (Menu, etc)
      config/         contains application configurations
      controllers/    contains Web controller classes
      forms/          contains web forms
      helpers/        contains application helpers
      mail/           contains view files for e-mails
      models/         contains model classes
      tests/          contains various tests for the basic application
      views/          contains view files for the Web application
      widgets/        contains widgets ready to use in views
modules/     contains custom modules
vendor/      contains dependent 3rd-party packages
runtime/     contains files generated during runtime
web/         contains the entry script and Web resources
config.php   local site application configuration

REQUIREMENTS

The minimum requirement by this project template that your Web server supports PHP 5.4.0.

INSTALLATION

Install composer if you have not any:

curl -sS https://getcomposer.org/installer | php
php composer.phar global require "fxp/composer-asset-plugin"

Get the project and all dependencies:

php composer.phar create-project skoro/yii2-admin-template yii2-admin 0.2

Answer the questions and if you need apply database migrations. And that's all. In case if you cannot install project via composer read next chapters.

MANUAL INSTALLATION

Clone project repository:

git clone https://github.com/skoro/yii2-admin-template.git yii2-admin

Install dependencies:

composer.phar install

Check project requirements:

./bin/requirements

Change to project directory and set permissions:

chmod 777 ./runtime ./web/assets

Create your host configuration by copying sample:

cp config-sample.php config.php

Set cookie validation key in config.php file to some random secret string:

'request' => [
    // !!! insert a secret key in the following (if it is empty) - this is required by cookie validation
    'cookieValidationKey' => '',
],

CONFIGURATION

Your local site configuration resides in config.php. You can create config.php by copying config-sample.php.

Database

Edit the file config.php in web root folder with real data, for example:

'db' => [
    'class' => 'yii\db\Connection',
    'dsn' => 'mysql:host=localhost;dbname=yii2basic',
    // Or SQLite3 database (directory data must be already created and must be
    // writable by webserver).
    // 'dsn' => 'sqlite:@runtime/data/db.sq3',
    'username' => 'root',
    'password' => '1234',
    'charset' => 'utf8',
];

Apply database migrations:

./bin/yii migrate

This imports user schema into your database.

Enable debug mode

To enabled debug bar uncomment following lines in config.php:

define('YII_DEBUG', true);
define('YII_ENV', 'dev');

If you are on local network (not 127.0.0.1) make debug modules happy with following lines:

    'modules' => [
        'debug' => [
            'allowedIPs' => ['192.168.1.*'],
        ],
        'gii' => [
            'allowedIPs' => ['192.168.1.*'],
        ],
    ],

These lines enable debug and gii modules for clients from 192.168.1.* subnetwork.

TESTING

After application has been installed and configured it's time to test it. First of all, create user via command yii line utility:

./bin/yii user/create "User name" mail@address.com

Assign the newly created user to the Administrators group:

./bin/yii rbac/assign mail@address Administrator

Then launch local web server:

./bin/yii serve

Now you can access the application through the following URL and try to login:

http://localhost:8080

skoro/yii2-admin-template 适用场景与选型建议

skoro/yii2-admin-template 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 452 次下载、GitHub Stars 达 20, 最近一次更新时间为 2016 年 08 月 05 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「framework」 「admin」 「backend」 「yii2」 「project template」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 skoro/yii2-admin-template 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 skoro/yii2-admin-template 我们能提供哪些服务?
定制开发 / 二次开发

基于 skoro/yii2-admin-template 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 452
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 20
  • 点击次数: 4
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 20
  • Watchers: 6
  • Forks: 3
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-08-05