为大麦快-admin提供的配置扩展

v1.0.0 2018-08-26 02:21 UTC

This package is not auto-updated.

Last update: 2024-09-29 05:21:00 UTC


README

StyleCI Packagist Total Downloads

灵感来源于 https://github.com/laravel-backpack/settings

屏幕截图

wx20170810-100226

安装

$ composer require daimakuai-extensions/config

$ php artisan migrate

打开 app/Providers/AppServiceProvider.php,在 boot 方法中调用 Config::load() 方法

<?php

namespace App\Providers;

use Jblv\Admin\Config\Config;
use Illuminate\Support\ServiceProvider;

class AppServiceProvider extends ServiceProvider
{
    public function boot()
    {
        Config::load();
    }
}

然后运行

$ php artisan admin:import config

打开 http://your-host/admin/config

使用方法

在面板中添加配置后,使用 config($key) 获取您配置的值。

许可协议

MIT 许可协议 (MIT) 下授权。