lefuturiste / slim3-template
这是slimframework 3的简单模板以及其他PHP库的集成。
1.1.9
2018-05-10 10:28 UTC
Requires
- doctrine/cache: ^1.7
- guzzlehttp/guzzle: ^6.3
- hassankhan/config: ^0.10.0
- jimmiw/php-time-ago: ^2.0
- lefuturiste/monolog-discord-handler: ^0.1.2
- lefuturiste/slim-bridge: ^1.0.5
- lefuturiste/slim-whoops: ^0.6.2
- monolog/monolog: ^1.23
- php-di/php-di: ^5.4
- simplon/mysql: ^2.2
- slim/slim: ^3.8
- slim/twig-view: ^2.2
- symfony/console: ^3.3
- symfony/translation: ^3.3
- symfony/twig-bridge: ^3.3
- tracy/tracy: ^2.4
- vlucas/phpdotenv: ^2.4
README
这是slimframework 3的简单模板以及其他PHP库的集成。
快速安装
只需运行一个
composer create-project lefuturiste/slim3-template
在根目录中创建一个.env
文件,并填写环境变量字段(你可以在.env.example
中获取字段列表)
控制台
此模板包括由symfony console提供的控制台
控制台允许以下命令
本地开发服务器
- php console serve -> 用于运行本地开发服务器(php cli)
维护模式
(未完成)
维护模式允许从您的Web应用程序中独立启用维护模式。
维护模式是为了在Web根目录(public)中将index.php文件重命名为_index.php,将maintenance.php文件重命名为index.php,反之亦然。
- php console maintenance open -> 用于启用维护模式
- php console maintenance close -> 用于禁用维护模式
资产编译
此模板包含gulpfile.js
使用bourbon和实时重载进行Sass编译
gulp sass
gulp sass:watch
一次性编译并压缩多个js文件到一个文件中
gulp concat-scripts
gulp minify-scripts