Implement a better management interface for Settings (#809)
This commit is contained in:
parent
75eb506dab
commit
f9df463d32
40 changed files with 1274 additions and 383 deletions
|
@ -1,5 +1,6 @@
|
|||
<?php
|
||||
|
||||
|
||||
return [
|
||||
'env' => env('APP_ENV', 'production'),
|
||||
|
||||
|
@ -14,7 +15,7 @@ return [
|
|||
| framework needs to place the application's name in a notification or
|
||||
| any other location as required by the application or its packages.
|
||||
*/
|
||||
'name' => 'Pterodactyl',
|
||||
'name' => env('APP_NAME', 'Pterodactyl'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
@ -158,6 +159,7 @@ return [
|
|||
/*
|
||||
* Application Service Providers...
|
||||
*/
|
||||
Pterodactyl\Providers\SettingsServiceProvider::class,
|
||||
Pterodactyl\Providers\AppServiceProvider::class,
|
||||
Pterodactyl\Providers\AuthServiceProvider::class,
|
||||
Pterodactyl\Providers\EventServiceProvider::class,
|
||||
|
@ -173,7 +175,6 @@ return [
|
|||
*/
|
||||
igaster\laravelTheme\themeServiceProvider::class,
|
||||
Prologue\Alerts\AlertsServiceProvider::class,
|
||||
Krucas\Settings\Providers\SettingsServiceProvider::class,
|
||||
Fideloper\Proxy\TrustedProxyServiceProvider::class,
|
||||
Laracasts\Utilities\JavaScript\JavaScriptServiceProvider::class,
|
||||
Lord\Laroute\LarouteServiceProvider::class,
|
||||
|
@ -228,7 +229,6 @@ 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,
|
||||
'Theme' => igaster\laravelTheme\Facades\Theme::class,
|
||||
|
|
|
@ -1,6 +1,18 @@
|
|||
<?php
|
||||
|
||||
|
||||
return [
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Restricted Environment
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Set this environment variable to true to enable a restricted configuration
|
||||
| setup on the panel. When set to true, configurations stored in the
|
||||
| database will not be applied.
|
||||
*/
|
||||
'load_environment_only' => (bool) env('APP_ENVIRONMENT_ONLY', false),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Service Author
|
||||
|
@ -22,7 +34,7 @@ return [
|
|||
| Should login success and failure events trigger an email to the user?
|
||||
*/
|
||||
'auth' => [
|
||||
'notifications' => env('LOGIN_NOTIFICATIONS', false),
|
||||
'2fa_required' => env('APP_2FA_REQUIRED', 0),
|
||||
'2fa' => [
|
||||
'bytes' => 32,
|
||||
'window' => env('APP_2FA_WINDOW', 4),
|
||||
|
|
|
@ -14,12 +14,14 @@ return [
|
|||
/*
|
||||
* Use a custom secret key, we use our public one by default
|
||||
*/
|
||||
'secret_key' => env('RECAPTCHA_SECRET_KEY', '6LekAxoUAAAAAPW-PxNWaCLH76WkClMLSa2jImwD'),
|
||||
'secret_key' => env('RECAPTCHA_SECRET_KEY', '6LcJcjwUAAAAALOcDJqAEYKTDhwELCkzUkNDQ0J5'),
|
||||
'_shipped_secret_key' => '6LcJcjwUAAAAALOcDJqAEYKTDhwELCkzUkNDQ0J5',
|
||||
|
||||
/*
|
||||
* Use a custom website key, we use our public one by default
|
||||
*/
|
||||
'website_key' => env('RECAPTCHA_WEBSITE_KEY', '6LekAxoUAAAAADjWZJ4ufcDRZBBiH9vfHawqRbup'),
|
||||
'website_key' => env('RECAPTCHA_WEBSITE_KEY', '6LcJcjwUAAAAAO_Xqjrtj9wWufUpYRnK6BW8lnfn'),
|
||||
'_shipped_website_key' => '6LcJcjwUAAAAAO_Xqjrtj9wWufUpYRnK6BW8lnfn',
|
||||
|
||||
/*
|
||||
* Domain verification is enabled by default and compares the domain used when solving the captcha
|
||||
|
|
|
@ -1,113 +0,0 @@
|
|||
<?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' => [
|
||||
],
|
||||
];
|
Loading…
Add table
Add a link
Reference in a new issue