Giter Club home page Giter Club logo

yii2-nifty's Introduction

yii2-nifty

搭建yii2框架下的后台管理系统全过程

  • 安装yii2框架

    basic版本:

    composer create-project --prefer-dist yiisoft/yii2-app-basic nifty
    

    advanced版本:

    composer create-project --prefer-dist yiisoft/yii2-app-advanced nifty
    
  • 初始化框架

    cd nifty   //进入框架根目录
    init       //初始化
    开发环境选择0,正式环境选择1,yes
    

    如果根目录下没有vendor文件夹,请使用 composer install 命令来安装。 需事先安装composer全局插件:composer global require "fxp/composer-asset-plugin:*"

  • 安装admin插件

    composer require sunnnnn/yii2-nifty
    
  • 根据yii版本,将目录/vendor/sunnnnn/yii2-nifty/下的文件复制覆盖到yii框架下

    advanced版本,将目录下advanced目录下的文件复制覆盖到对象位置,

    basic版本,则将basic目录下所有文件复制覆盖到对象位置,

    (config文件可不用覆盖,根据注释添加到原config文件中)

  • 新建一个数据库:yii-nifty(名字自己取)

    basic版本,在 config/db.php 配置数据库链接,

    advanced版本,在 common/config/main-local.php 配置数据库链接

  • 添加数据表及数据

    yii migrate --migrationPath=@sunnnnn/nifty/auth/migrations/       //windows下
    
    php yii migrate --migrationPath=@sunnnnn/nifty/auth/migrations/   //linux下
    
    yes  //等待完成
    
  • 直接访问: http://您的域名/site/login页面,用户名admin、密码123456

  • gii操作

    使用gii生成model:最下方的Code Template选项,选择 sunnnnn-nifty-model

    使用gii生成curd:最下方的Code Template选项,选择 sunnnnn-nifty-curd

  • 其他 yii2-nifty的使用

yii2-nifty's People

Contributors

yaobuer avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.