61 lines
1.6 KiB
Markdown
61 lines
1.6 KiB
Markdown
Config manager for laravel-admin
|
|
========================
|
|
|
|
[](https://styleci.io/repos/97900916)
|
|
[](https://packagist.org/packages/laravel-admin-ext/config)
|
|
[](https://packagist.org/packages/laravel-admin-ext/config)
|
|
[]()
|
|
|
|
Inspired by https://github.com/laravel-backpack/settings.
|
|
|
|
[Documentation](http://laravel-admin.org/docs/#/en/extension-config) | [中文文档](http://laravel-admin.org/docs/#/zh/extension-config)
|
|
|
|
## Screenshot
|
|
|
|

|
|
|
|
## Installation
|
|
|
|
```
|
|
$ composer require laravel-admin-ext/config
|
|
|
|
$ php artisan migrate
|
|
```
|
|
|
|
Open `app/Providers/AppServiceProvider.php`, and call the `Config::load()` method within the `boot` method:
|
|
|
|
```php
|
|
<?php
|
|
|
|
namespace App\Providers;
|
|
|
|
use Encore\Admin\Config\Config;
|
|
use Illuminate\Support\ServiceProvider;
|
|
|
|
class AppServiceProvider extends ServiceProvider
|
|
{
|
|
public function boot()
|
|
{
|
|
if (class_exists(Config::class)) {
|
|
Config::load();
|
|
}
|
|
}
|
|
}
|
|
```
|
|
|
|
Then run:
|
|
|
|
```
|
|
$ php artisan admin:import config
|
|
```
|
|
|
|
Open `http://your-host/admin/config`
|
|
|
|
## Usage
|
|
|
|
After add config in the panel, use `config($key)` to get value you configured.
|
|
|
|
License
|
|
------------
|
|
Licensed under [The MIT License (MIT)](LICENSE).
|