vova07/yii2-start
Composer 安装命令:
composer create-project vova07/yii2-start
包简介
Yii2-Start it's a small Yii 2 application template for your fast project start.
README 文档
README
DEMO:
Frontend: http://yii2-start.find-freelancer.pro
Backend: http://yii2-start.find-freelancer.pro/backend/
Authentication:
Login: admin
Password: admin12345
Installation and getting started:
If you do not have Composer, you may install it by following the instructions at getcomposer.org.
If you do not have Composer-Asset-Plugin installed, you may install it by running command: php composer.phar global require "fxp/composer-asset-plugin:1.0.0"
- Run the following commands to install Yii2-Start:
php composer.phar create-project --prefer-dist --stability=dev vova07/yii2-start yii2-start
During the installation process can be requiredpasswordand\orusernamefrom your Github account. This is because you make too much request to Github service. Just remember that this can be. - Run command:
cd /my/path/to/yii2-start/and go to main application directory. - Run command:
php requirements.phpand check the requirements. - Run command:
php initto initialize the application with a specific environment. - Create a new database and adjust it configuration in
common/config/db.phpaccordingly. - Apply migrations with console commands:
php yii migrate --migrationPath=@vova07/users/migrationsphp yii migrate --migrationPath=@vova07/blogs/migrationsphp yii migrate --migrationPath=@vova07/comments/migrations- This will create tables needed for the application to work.
- You also can use database dump
db.sqlfrommy/path/to/yii2-start/common/data, but however I recommend to use migrations.
- Run modules RBAC commands:
php yii rbac/rbac/initphp yii users/rbac/addphp yii blogs/rbac/addphp yii comments/rbac/add
- Set document roots of your Web server:
For Apache:
<VirtualHost *:80>
ServerName www.yii2-start.domain # You need to change it to your own domain
ServerAlias yii2-start.domain # You need to change it to your own domain
DocumentRoot /my/path/to/yii2-start # You need to change it to your own path
<Directory /my/path/to/yii2-start> # You need to change it to your own path
AllowOverride All
</Directory>
</VirtualHost>
- Use the URL
http://yii2-start.domainto access application frontend. - Use the URL
http://yii2-start.domain/backend/to access application backend.
For Nginx:
___Frontend___
```
server {
charset utf-8;
client_max_body_size 128M;
listen 80; ## listen for ipv4
# listen [::]:80 ipv6only=on; ## listen for ipv6
set $yii2StartRoot '/my/path/to/yii2-start'; ## You need to change it to your own path
server_name yii2-start.domain; ## You need to change it to your own domain
root $yii2StartRoot/frontend/web;
index index.php;
#access_log $yii2StartRoot/log/frontend/access.log;
#error_log $yii2StartRoot/log/frontend/error.log;
location / {
# Redirect everything that isn't a real file to index.php
try_files $uri $uri/ /index.php?$args;
}
location /statics {
alias $yii2StartRoot/statics/web/;
}
# uncomment to avoid processing of calls to non-existing static files by Yii
#location ~ \.(js|css|png|jpg|gif|swf|ico|pdf|mov|fla|zip|rar)$ {
# try_files $uri =404;
#}
#error_page 404 /404.html;
location ~ \.php$ {
#include fastcgi_params;
include fastcgi.conf;
fastcgi_pass 127.0.0.1:9000;
#fastcgi_pass unix:/var/run/php5-fpm.sock;
try_files $uri =404;
}
location ~ /\.(ht|svn|git) {
deny all;
}
}
```
__Backend__
```
server {
charset utf-8;
client_max_body_size 128M;
listen 80; ## listen for ipv4
# listen [::]:80 ipv6only=on; ## listen for ipv6
set $yii2StartRoot '/my/path/to/yii2-start'; ## You need to change it to your own path
server_name backend.yii2-start.domain; ## You need to change it to your own domain
root $yii2StartRoot/backend/web;
index index.php;
#access_log $yii2StartRoot/log/backend/access.log;
#error_log $yii2StartRoot/log/backend/error.log;
location / {
# Redirect everything that isn't a real file to index.php
try_files $uri $uri/ /index.php?$args;
}
location /statics {
alias $yii2StartRoot/statics/web/;
}
# uncomment to avoid processing of calls to non-existing static files by Yii
#location ~ \.(js|css|png|jpg|gif|swf|ico|pdf|mov|fla|zip|rar)$ {
# try_files $uri =404;
#}
#error_page 404 /404.html;
location ~ \.php$ {
#include fastcgi_params;
include fastcgi.conf;
fastcgi_pass 127.0.0.1:9000;
#fastcgi_pass unix:/var/run/php5-fpm.sock;
try_files $uri =404;
}
location ~ /\.(ht|svn|git) {
deny all;
}
}
```
**Remove `'baseUrl' => '/backend'` from `/my/path/to/yii2-start/backend/config/main.php`.**
- Use the URL `http://yii2-start.domain` to access application frontend.
- Use the URL `http://backend.yii2-start.domain` to access application backend.
Notes:
By default will be created one super admin user with login admin and password admin12345, you can use this data to sing in application frontend and backend.
Themes:
vova07/yii2-start 适用场景与选型建议
vova07/yii2-start 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 11.09k 次下载、GitHub Stars 达 268, 最近一次更新时间为 2014 年 08 月 28 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「bootstrap」 「application」 「yii2」 「start」 「yii 2」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 vova07/yii2-start 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 vova07/yii2-start 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 vova07/yii2-start 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Kinikit - PHP Application development framework MVC component
A custom URL rule class for Yii 2 which allows to create translated URL rules
A Laravel queue connector to process jobs at the end of the application
Views for the package MedicOneSystems Livewire Datatables with Bootstrap 4
C3JS By phpanonymous (Mahmoud Ibrahim)
bootstrap select field module implementing http://silviomoreto.github.io/bootstrap-select/
统计信息
- 总下载量: 11.09k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 271
- 点击次数: 7
- 依赖项目数: 7
- 推荐数: 0
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 2014-08-28