config
config copied to clipboard
Config manager for laravel-admin
在看到这个扩展前,我也是用这样的表,这么写的。注释了中文,增加了缓存。现在我想把这个继续用起来。 于是我在routes.php中增加: ` // 网站配置 $router->resource('config', ConfigController::class);` 但安装了此扩展后,写这句没用,并没有指向这个控制器。 ` /** * Make a form builder. * * @return Form */ protected function form() { $form = new Form(new Config); $form->display('title',...
添加缓存避免频繁查询数据库
Please fix documentation. It says that After add config in the panel, use `config($key)` to get value you configured. But in reality working code is this one `config('key')`
When running command: php artisan config:cache; Error: Illuminate\Database\QueryException SQLSTATE[HY000] [2002] Connection refused (SQL: select * from information_schema.tables where table_schema = clp and table_name = admin_config and table_type = 'BASE TABLE')...
https://github.com/laravel-admin-extensions/config/blob/183b7974725eec7c4845a442a248c5f847599a89/src/Config.php#L17 ``` foreach (ConfigModel::all(['name', 'value']) as $config) { if (empty($config['name'])) { config([$config['name'] => $config['value']]); } } ```
环境: laravel 5.6 laravel-admin 1.5 建议: 1. 安装时添加迁移文件到migrations目录 2. 移除如下 if 部分代码(该代码会引起重复迁移) ```
增加了翻译中文
It always returns null on every key defined in config