Add settings to panel

This commit is contained in:
Dane Everitt 2016-01-20 22:08:09 -05:00
parent 591cc8648d
commit b63fc02cef
12 changed files with 317 additions and 14 deletions

View file

@ -153,6 +153,7 @@ return [
Barryvdh\Debugbar\ServiceProvider::class,
PragmaRX\Google2FA\Vendor\Laravel\ServiceProvider::class,
Prologue\Alerts\AlertsServiceProvider::class,
Krucas\Settings\Providers\SettingsServiceProvider::class
],
@ -202,6 +203,7 @@ return [
'Response' => Illuminate\Support\Facades\Response::class,
'Route' => Illuminate\Support\Facades\Route::class,
'Schema' => Illuminate\Support\Facades\Schema::class,
'Settings' => Krucas\Settings\Facades\Settings::class,
'Session' => Illuminate\Support\Facades\Session::class,
'Storage' => Illuminate\Support\Facades\Storage::class,
'URL' => Illuminate\Support\Facades\URL::class,

118
config/settings.php Normal file
View file

@ -0,0 +1,118 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Default Settings Driver
|--------------------------------------------------------------------------
|
| Settings driver used to store persistent settings.
|
| Supported: "database"
|
*/
'default' => env('SETTINGS_DRIVER', 'database'),
/*
|--------------------------------------------------------------------------
| Enable / Disable caching
|--------------------------------------------------------------------------
|
| If it is enabled all values gets cached after accessing it.
|
*/
'cache' => true,
/*
|--------------------------------------------------------------------------
| Enable / Disable value encryption
|--------------------------------------------------------------------------
|
| If it is enabled all values gets encrypted and decrypted.
|
*/
'encryption' => env('SETTINGS_ENCRYPTION', false),
/*
|--------------------------------------------------------------------------
| Enable / Disable events
|--------------------------------------------------------------------------
|
| If it is enabled various settings related events will be fired.
|
*/
'events' => true,
/*
|--------------------------------------------------------------------------
| Repositories Configuration
|--------------------------------------------------------------------------
|
| Here you may configure the driver information for each repository that
| is used by your application. A default configuration has been added
| for each back-end shipped with this package. You are free to add more.
|
*/
'repositories' => [
'database' => [
'driver' => 'database',
'connection' => env('DB_CONNECTION', 'mysql'),
'table' => 'settings',
],
],
/*
|--------------------------------------------------------------------------
| Key generator class
|--------------------------------------------------------------------------
|
| Key generator is used to generate keys based on setting key and context.
|
*/
'key_generator' => \Krucas\Settings\KeyGenerators\KeyGenerator::class,
/*
|--------------------------------------------------------------------------
| Context serializer class
|--------------------------------------------------------------------------
|
| Context serializer serializes context.
| It is used with "Krucas\Settings\KeyGenerators\KeyGenerator" class.
|
*/
'context_serializer' => \Krucas\Settings\ContextSerializers\ContextSerializer::class,
/*
|--------------------------------------------------------------------------
| Value serializer class
|--------------------------------------------------------------------------
|
| Value serializer serializes / unserializes given value.
|
*/
'value_serializer' => \Krucas\Settings\ValueSerializers\ValueSerializer::class,
/*
|--------------------------------------------------------------------------
| Override application config values
|--------------------------------------------------------------------------
|
| If defined, settings package will override these config values from persistent
| settings repository.
|
| Sample:
| "app.fallback_locale",
| "app.locale" => "settings.locale",
|
*/
'override' => [
],
];