takeawaytown / laravel-settings
A package that allows saving persistent settings to either JSON or database in Laravel 5
Requires
- php: >=7.0.0
- illuminate/support: >=4.1 <6.0
Requires (Dev)
- illuminate/database: >=4.1 <6.0
- illuminate/filesystem: >=4.1 <6.0
- mockery/mockery: 0.9.*
- phpunit/phpunit: >=4.8, <6
Suggests
- illuminate/database: Allows you to save settings to a database table.
- illuminate/filesystem: Allows you to save settings to a JSON file.
README
Laravel Settings
Laravel 5.x persistent settings using Database and/or JSON
Install process
-
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
Credits to main author
Anlutro Laravel Settings: anlutro/laravel-settings