akbsit/slim-skeleton
最新稳定版本:1.0.4
Composer 安装命令:
composer create-project akbsit/slim-skeleton
包简介
The framework of a PHP application based on the Slim Framework.
README 文档
README
Framework PHP application based on Slim Framework.
Includes packages:
To install the application, you need to deploy it in your working folder:
composer create-project akbsit/slim-skeleton ./ "1.*"
Create an environment settings file based on the example .env.example, for local environment .env.local, for production .env.production.
The local environment is defined by subdomains: .loc и .local.
Adding settings
Application uses two types of settings:
- Required (without their definition in
.env.localand.env.productionthe application will not start); - Optional.
All settings names are converted to upper case.
Adding required settings
The required set of settings can be supplemented in the environment definition file src/Env.php - the $arRequiredParams parameter (it is important not to delete the default settings as they are used in the application). After that, all added settings will need to be defined in the configuration file configs/app.php by analogy.
It is not recommended to use this method!
Adding optional settings
To add your own set, you will need to create a file with an arbitrary name in the configs folder and with the contents:
custom_config.php
return [ 'CONFIG_NAME_1' => 'CONFIG_VALUE_1', 'CONFIG_NAME_2' => 'CONFIG_VALUE_2', 'CONFIG_NAME_3' => 'CONFIG_VALUE_3', 'CONFIG_NAME_4' => 'CONFIG_VALUE_4' ];
After which the settings will be available in the application. The file name is a key in the config array. Example of use in a controller:
$this->config->CUSTOM_CONFIG['CONFIG_NAME_1']
统计信息
- 总下载量: 3
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-09-17