takeawaytown / laravel-settings
一个允许在Laravel 5中将持久化设置保存到JSON或数据库的包
1.0.3
2017-11-13 11:05 UTC
Requires
- php: >=7.0.0
- illuminate/support: >=4.1 <6.0
Requires (Dev)
- illuminate/database: >=4.1 <6.0
- illuminate/filesystem: >=4.1 <6.0
- mockery/mockery: 0.9.*
- phpunit/phpunit: >=4.8, <6
Suggests
- illuminate/database: Allows you to save settings to a database table.
- illuminate/filesystem: Allows you to save settings to a JSON file.
README
Laravel Settings
使用数据库和/或JSON实现Laravel 5.x的持久化设置
安装过程
-
使用Composer安装此包
composer require takeawaytown/laravel-settings
-
在
config/app.php
中的providers
数组中注册ServiceProviderTakeawayTown\LaravelSettings\SettingsServiceProvider::class,
-
在
config/app.php
中的aliases
数组中为外观添加别名'Settings' => TakeawayTown\LaravelSettings\Facades\Settings::class,
-
发布配置和迁移文件
php artisan vendor:publish --provider="TakeawayTown\LaravelSettings\SettingsServiceProvider" --force
根据需要修改config/settings.php
创建settings
表。
php artisan migrate
感谢主要作者
Anlutro Laravel Settings: anlutro/laravel-settings