Package Data | |
---|---|
Maintainer Username: | akiyamaSM |
Package Create Date: | 2018-09-10 |
Package Last Update: | 2019-05-13 |
Home Page: | |
Language: | Vue |
License: | MIT |
Last Refreshed: | 2024-11-23 03:21:47 |
Package Statistics | |
---|---|
Total Downloads: | 25,839 |
Monthly Downloads: | 168 |
Daily Downloads: | 23 |
Total Stars: | 40 |
Total Watchers: | 3 |
Total Forks: | 8 |
Total Open Issues: | 0 |
Use Configuration inputs instead of the env/config files. Good news for the clients!
Laravel Nova.
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
After installing the tool, you should see the new sidebar navigation item for Packages Configuration
.
And then just you have to manipulate the settings.
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);
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.