use config instead of env()
This commit is contained in:
@@ -57,7 +57,7 @@ class Dev extends Command
|
||||
{
|
||||
// Generate APP_KEY if not exists
|
||||
|
||||
if (empty(env('APP_KEY'))) {
|
||||
if (empty(config('app.key'))) {
|
||||
echo "Generating APP_KEY.\n";
|
||||
Artisan::call('key:generate');
|
||||
}
|
||||
|
||||
@@ -77,8 +77,8 @@ class Init extends Command
|
||||
echo "Could not setup dynamic configuration: {$e->getMessage()}\n";
|
||||
}
|
||||
$settings = instanceSettings();
|
||||
if (! is_null(env('AUTOUPDATE', null))) {
|
||||
if (env('AUTOUPDATE') == true) {
|
||||
if (! is_null(config('constants.coolify.autoupdate', null))) {
|
||||
if (config('constants.coolify.autoupdate') == true) {
|
||||
$settings->update(['is_auto_update_enabled' => true]);
|
||||
} else {
|
||||
$settings->update(['is_auto_update_enabled' => false]);
|
||||
|
||||
@@ -57,7 +57,7 @@ class SyncBunny extends Command
|
||||
|
||||
PendingRequest::macro('storage', function ($fileName) use ($that) {
|
||||
$headers = [
|
||||
'AccessKey' => env('BUNNY_STORAGE_API_KEY'),
|
||||
'AccessKey' => config('constants.bunny.storage_api_key'),
|
||||
'Accept' => 'application/json',
|
||||
'Content-Type' => 'application/octet-stream',
|
||||
];
|
||||
@@ -69,7 +69,7 @@ class SyncBunny extends Command
|
||||
});
|
||||
PendingRequest::macro('purge', function ($url) use ($that) {
|
||||
$headers = [
|
||||
'AccessKey' => env('BUNNY_API_KEY'),
|
||||
'AccessKey' => config('constants.bunny.api_key'),
|
||||
'Accept' => 'application/json',
|
||||
];
|
||||
$that->info('Purging: '.$url);
|
||||
|
||||
Reference in New Issue
Block a user