sitic/settings

项目设置类别

dev-main 2021-09-13 16:55 UTC

This package is auto-updated.

Last update: 2024-09-13 22:59:44 UTC


README

此包用于创建设置类别。建议与某些直接设置包一起使用。

LUMEN 实现

1. 安装包

composer require sitic/settings

2. 在 bootstrap/app.php 中添加

配置文件

/*
|--------------------------------------------------------------------------
| Register Config Files
|--------------------------------------------------------------------------
|
| Now we will register the "app" configuration file. If the file exists in
| your configuration directory it will be loaded; otherwise, we'll load
| the default version. You may register other files below as needed.
|
*/
$app->configure('settings');

提供者

/*
|--------------------------------------------------------------------------
| Register Service Providers
|--------------------------------------------------------------------------
|
| Here we will register all of the application's service providers which
| are used to bind services into the container. Service providers are
| totally optional, so you are not required to uncomment this line.
|
*/
$app->register(\Sitic\Settings\SettingsServiceProvider::class);

3. 运行迁移

php artisan migrate

4. 安装默认设置

php artisan sitic:settings