linnella / config
管理员配置扩展
v1.0
2018-06-25 22:14 UTC
Requires
- php: >=7.0.0
- laravel/framework: ~5.5
- linnella/core: 1.0
Requires (Dev)
- laravel/laravel: ~5.5
- phpunit/phpunit: ~6.0
This package is not auto-updated.
Last update: 2024-09-29 05:21:05 UTC
README
安装
$ composer require linnella/config:dev-master
$ php artisan migrate
打开 app/Providers/AppServiceProvider.php 文件,并在 boot 方法中调用 Config::load() 方法
<?php namespace App\Providers; use Core\Admin\Config\Config; use Illuminate\Support\ServiceProvider; class AppServiceProvider extends ServiceProvider { public function boot() { Config::load(); } }
然后运行
$ php artisan admin:import config
打开 http://host/admin/config
用法
在面板中添加配置后,使用 config($key) 获取您配置的值。
许可
在 MIT 许可证 (MIT) 下授权。