eapanel/yii2-webapp-start

Yii 2 Web应用程序启动模板

dev-master 2016-04-05 17:16 UTC

This package is auto-updated.

Last update: 2024-08-28 02:32:23 UTC


README

Yii 2 Web应用程序启动模板是一个理想的Yii 2应用程序骨架,适用于快速创建小型项目。

目录结构

  commands/           contains console commands (controllers)
  config/             contains application configurations
  mail/               contains view files for e-mails
  messages/           contains common translation files
  migrations/         contains migrations classes
  modules/
  runtime/            contains files generated during runtime
  tests/              contains various tests for the basic application
  themes/             содержит темы оформления
  vendor/             contains dependent 3rd-party packages
  web/                contains the entry script and Web resources

需求

本应用程序模板的最低要求是您的Web服务器支持PHP 5.4.0。

安装

通过Composer安装

如果您没有Composer,您可以按照getcomposer.org上的说明进行安装。

然后,您可以使用以下命令安装此应用程序模板:

php composer.phar global require "fxp/composer-asset-plugin:~1.1.1"
php composer.phar create-project --prefer-dist --stability=dev eapanel/yii2-webapp-start new_app

现在,假设new_app是Web根目录下的直接目录,您应该可以通过以下URL访问应用程序。

https:///new_app/web/

配置

数据库

使用真实数据编辑文件config/common.php

注意: Yii不会为您创建数据库,您需要手动创建,才能访问它。

另外,检查并编辑config/目录中的其他文件以自定义您的应用程序。

迁移

yii migrate --migrationPath=@yii/rbac/migrations
yii migrate --migrationPath=@dektrium/user/migrations
yii migrate