Laravel 5.x persistent settings using Database and/or JSON
-
Require this package with composer :
composer require takeawaytown/laravel-settings
-
Register the ServiceProvider to the
providers
array inconfig/app.php
TakeawayTown\LaravelSettings\SettingsServiceProvider::class,
-
Add an alias for the facade to
aliases
array in yourconfig/app.php
'Settings' => TakeawayTown\LaravelSettings\Facades\Settings::class,
-
Publish the config and migration files:
php artisan vendor:publish --provider="TakeawayTown\LaravelSettings\SettingsServiceProvider" --force
Change config/settings.php
according to your needs.
Create the settings
table.
php artisan migrate
Anlutro Laravel Settings: anlutro/laravel-settings