DatabaseSettings is a package to easily store settings in the database and retrieve the setting using config('settings').
Via Composer
$ composer require simonmarcellinden/databasesettings
Register the package's service provider in config/app.php. In Laravel versions 5.5 and beyond, this step can be skipped if package auto-discovery is enabled.
Open and add the service provider to bootstrap/app.php
$app->register(\SimonMarcelLinden\DatabaseSettings\DatabaseSettingsProvider::class);
Run this on the command line from the root of your project:
$ no config needed
Run the migrations to add the required tables to your database.
$ php artisan migrate:fresh
Run seed for example settings
$ php artisan db:seed --class=SimonMarcelLinden\DatabaseSettings\Database\Seeders\SettingSeeder
Default routes for store/update & view setting
$router->group(['prefix' => 'image'], function () use ($router) {
$router->get('/{id}', 'ImageController@show');
$router->post('/upload', 'ImageController@upload');
$router->delete('/delete/{id}', 'ImageController@delete');
});
Add a Script or Style Source directly into your route or controller
Please see the changelog for more information on what has changed recently.
$ composer test
Please see contributing.md for details and a todolist.
If you discover any security related issues, please email info@snerve.de instead of using the issue tracker.