* Migrate all configs into the env.php file #1075 * Style fixes * Fix config names in CreateConfig * Fix installer/installer error messagespull/1130/head
parent
6c3992e781
commit
ac64a5db75
@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use App\Contracts\Command;
|
||||
use App\Services\Installer\ConfigService;
|
||||
|
||||
/**
|
||||
* Command to rewrite the config files
|
||||
*/
|
||||
class RewriteConfigs extends Command
|
||||
{
|
||||
protected $signature = 'phpvms:rewrite-configs';
|
||||
protected $description = 'Rewrite the config files';
|
||||
|
||||
/**
|
||||
* Run dev related commands
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
/** @var ConfigService $configSvc */
|
||||
$configSvc = app(ConfigService::class);
|
||||
$configSvc->rewriteConfigFiles();
|
||||
}
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
use App\Contracts\Migration;
|
||||
use App\Services\Installer\ConfigService;
|
||||
|
||||
/**
|
||||
* Migrate the configuration files
|
||||
*/
|
||||
class MigrateConfigs extends Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
/** @var ConfigService $configSvc */
|
||||
$configSvc = app(ConfigService::class);
|
||||
$configSvc->rewriteConfigFiles();
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
}
|
||||
}
|
@ -1,8 +1,49 @@
|
||||
#
|
||||
# THIS FILE MUST BE KEPT SECRET! IT IS BLOCKED IN THE HTACCESS FILE
|
||||
# HOWEVER, THIS DIRECTORY SHOULDN'T BE EXPOSED TO THE PUBLIC AT ALL
|
||||
# SEE THE DOCS FOR PROPER (SECURE) INSTALLATION:
|
||||
# https://docs.phpvms.net/installation/uploading
|
||||
#
|
||||
# This is the place to edit your configuration. To change a config that's
|
||||
# not present here, you need to either edit the file/config in the config
|
||||
# folder, or change it to read the value from the environment. Something like:
|
||||
#
|
||||
# 'some_key' = env('ENVIRONMENT_VARIABLE_KEY_ADDED_BELOW', 'default value')
|
||||
#
|
||||
# Various other settings in the configs also read from some environment variables
|
||||
# by default. You can override those here
|
||||
|
||||
APP_KEY='$APP_KEY$'
|
||||
SITE_NAME='$SITE_NAME$'
|
||||
SITE_URL='$SITE_URL$'
|
||||
APP_ENV=$APP_ENV$
|
||||
APP_LOCALE=$APP_LOCALE$
|
||||
LOG_LEVEL=debug
|
||||
APP_DEBUG=$APP_DEBUG$
|
||||
DEBUG_TOOLBAR=$DEBUG_TOOLBAR$
|
||||
|
||||
# DATABASE SETTINGS
|
||||
DB_CONNECTION=$DB_CONNECTION$
|
||||
DB_HOST='$DB_HOST$'
|
||||
DB_PORT=$DB_PORT$
|
||||
DB_DATABASE='$DB_DATABASE$'
|
||||
DB_USERNAME='$DB_USERNAME$'
|
||||
DB_PASSWORD='$DB_PASSWORD$'
|
||||
DB_PREFIX='$DB_PREFIX$'
|
||||
DB_EMULATE_PREPARES=$DB_EMULATE_PREPARES$
|
||||
DB_SOCKET=
|
||||
|
||||
# CACHE SETTINGS
|
||||
CACHE_DRIVER=$CACHE_DRIVER$
|
||||
CACHE_PREFIX=$CACHE_PREFIX$
|
||||
|
||||
APP_KEY=base64:$APP_KEY$
|
||||
# EMAIL SETTINGS
|
||||
# Look at the available mail configs in config/mail.php
|
||||
# Also refer to the Laravel docs here: https://laravel.com/docs/8.x/mail
|
||||
MAIL_DRIVER=$MAIL_DRIVER$
|
||||
MAIL_FROM_NAME='$MAIL_FROM_NAME$'
|
||||
MAIL_FROM_ADDRESS='$MAIL_FROM_ADDRESS$'
|
||||
MAIL_HOST=$MAIL_HOST$
|
||||
MAIL_PORT=$MAIL_PORT$
|
||||
MAIL_ENCRYPTION=$MAIL_ENCRYPTION$
|
||||
MAIL_USERNAME=$MAIL_USERNAME$
|
||||
MAIL_PASSWORD=$MAIL_PASSWORD$
|
||||
|
@ -1,19 +1,20 @@
|
||||
@if (session()->has('flash_notification.message'))
|
||||
@if (session()->has('flash_notification.overlay'))
|
||||
@include('flash::modal', [
|
||||
'modalClass' => 'flash-modal',
|
||||
'title' => session('flash_notification.title'),
|
||||
'body' => session('flash_notification.message')
|
||||
])
|
||||
@foreach (collect(session('flash_notification', collect()))->toArray() as $message)
|
||||
@if (is_string($message))
|
||||
<div class="alert alert-error">{!! $message !!}</div>
|
||||
@else
|
||||
<div class="alert
|
||||
alert-{{ session('flash_notification.level') }}
|
||||
{{ session()->has('flash_notification.important') ? 'alert-important' : '' }}">
|
||||
@if(session()->has('flash_notification.important'))
|
||||
<button type="button" class="close" data-dismiss="alert">×</button>
|
||||
<div class="alert alert-{{ $message['level'] }}
|
||||
{{ $message['important'] ? 'alert-important' : '' }}"
|
||||
role="alert">
|
||||
@if ($message['important'])
|
||||
<button type="button"
|
||||
class="close"
|
||||
data-dismiss="alert"
|
||||
aria-hidden="true">×</button>
|
||||
@endif
|
||||
|
||||
{{ session('flash_notification.message') }}
|
||||
{!! $message['message'] !!}
|
||||
</div>
|
||||
@endif
|
||||
@endif
|
||||
@endforeach
|
||||
|
||||
{{ session()->forget('flash_notification') }}
|
||||
|
Loading…
Reference in new issue