ozee31 / cakephp-starter
CakePHP 框架骨架应用
1.2.0
2016-10-19 13:39 UTC
Requires
- php: >=5.5.9
- cakephp/cakephp: 3.3.*
- cakephp/migrations: ~1.0
- cakephp/plugin-installer: *
- daoandco/cakephp-cachecleaner: ^1.0
- mobiledetect/mobiledetectlib: 2.*
- wyrihaximus/twig-view: ^3.3
Requires (Dev)
- cakephp/bake: ~1.1
- cakephp/debug_kit: ~3.2
- psy/psysh: @stable
Suggests
- cakephp/cakephp-codesniffer: Allows to check the code against the coding standards used in CakePHP.
- markstory/asset_compress: An asset compression plugin which provides file concatenation and a flexible filter system for preprocessing and minification.
- phpunit/phpunit: Allows automated tests to be run without system-wide install.
This package is not auto-updated.
Last update: 2024-09-14 18:53:18 UTC
README
用于创建 CakePHP 3.x 应用的骨架。
框架源代码可在以下位置找到: cakephp/cakephp。
安装
CakePHP
- 下载 Composer 或更新
composer self-update
。 - 运行
php composer.phar create-project --prefer-dist ozee31/cakephp-starter [app_name]
。
如果 Composer 已全局安装,则运行
composer create-project --prefer-dist ozee31/cakephp-starter [app_name]
现在您应该能够访问您安装应用的路径,并看到默认的主页。
前端
运行 npm install
配置
阅读并编辑 config/app.php
并设置 '数据源' 以及任何与应用相关的其他配置。
前端
架构
- /front/build/* : webpack 配置
- /front/src/* : 所有前端源代码 (es2015 + scss...)
调试模式
使用命令 npm run dev
运行 webpack 网络服务器
部署
运行 npm run build
并在 app.php 中更改调试模式
子目录配置
例如,如果 URL 访问是 /subdir/
而不是 /
在 config/app.php 中更改
'Webpack' => [
'assets' => [
'dev' => 'https://:3003/subdir/app.js',
'config' => 'assets.json',
],
],
并在 front/build/config.js 中更改
assets_url: '/subdir/'