inani/laravel-nova-configuration
最新稳定版本:1.3
Composer 安装命令:
composer require inani/laravel-nova-configuration
包简介
A Laravel Nova tool.
README 文档
README
Use Configuration inputs instead of the env/config files. Good news for the clients!

Requirements
Laravel Nova.
Installation
First install the Nova package via composer:
composer require inani/laravel-nova-configuration
Next up, you must register the tool via the tools method of the NovaServiceProvider.
// inside app/Providers/NovaServiceProvder.php // ... public function tools() { return [ // ... new \Inani\LaravelNovaConfiguration\LaravelNovaConfiguration() ]; }
Publish the config file:
php artisan vendor:publish --provider="Inani\LaravelNovaConfiguration\ToolServiceProvider"
Then run the migration
php artisan migrate
Usage
In the back office
After installing the tool, you should see the new sidebar navigation item for Packages Configuration.
And then just you have to manipulate the settings.
In the code
use Inani\LaravelNovaConfiguration\Helpers\Configuration; // Get the value of the API_GOOGLE key, null if it doesn't exist $value = Configuration::get('API_GOOGLE'); // Get the value of the FOO key, 'BAR' if it doesn't exist $value = Configuration::get('FOO', 'BAR);
Updating the sidebar bar label
If you want to update the display name of the tool in the Laravel Nova sidebar, You can simply update the sidebar-label in the following file
resources/views/laravel-nova-configuration/navigation.blade.php
Enjoy coding.
统计信息
- 总下载量: 27.73k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 40
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-10-05