fixed app url issue
This commit is contained in:
parent
03c960d7e9
commit
bdb51a27a4
@ -5,6 +5,7 @@ APP_INSTALLED=false
|
||||
APP_KEY=
|
||||
APP_DEBUG=true
|
||||
APP_SCHEDULE_TIME="09:00"
|
||||
APP_URL=
|
||||
|
||||
DB_CONNECTION=mysql
|
||||
DB_HOST=localhost
|
||||
|
@ -5,6 +5,7 @@ APP_INSTALLED=true
|
||||
APP_KEY=base64:xBC+BxlC7sXhYAtpTZv8TYAHqoPgsJaXL0S5Id6BbBc=
|
||||
APP_DEBUG=true
|
||||
APP_SCHEDULE_TIME="09:00"
|
||||
APP_URL=
|
||||
|
||||
DB_CONNECTION=sqlite
|
||||
DB_DATABASE=:memory:
|
||||
|
@ -5,10 +5,10 @@ namespace App\Utilities;
|
||||
use App\Jobs\Auth\CreateUser;
|
||||
use App\Jobs\Common\CreateCompany;
|
||||
use App\Utilities\Console;
|
||||
use Artisan;
|
||||
use Config;
|
||||
use DB;
|
||||
use File;
|
||||
use Illuminate\Support\Facades\Artisan;
|
||||
use Illuminate\Support\Facades\Config;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\File;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
/**
|
||||
@ -232,7 +232,7 @@ class Installer
|
||||
|
||||
public static function createCompany($name, $email, $locale)
|
||||
{
|
||||
dispatch_now(new CreateCompany([
|
||||
dispatch_sync(new CreateCompany([
|
||||
'name' => $name,
|
||||
'domain' => '',
|
||||
'email' => $email,
|
||||
@ -244,7 +244,7 @@ class Installer
|
||||
|
||||
public static function createUser($email, $password, $locale)
|
||||
{
|
||||
dispatch_now(new CreateUser([
|
||||
dispatch_sync(new CreateUser([
|
||||
'name' => '',
|
||||
'email' => $email,
|
||||
'password' => $password,
|
||||
@ -258,13 +258,19 @@ class Installer
|
||||
public static function finalTouches()
|
||||
{
|
||||
// Update .env file
|
||||
static::updateEnv([
|
||||
$env = [
|
||||
'APP_LOCALE' => session('locale'),
|
||||
'APP_INSTALLED' => 'true',
|
||||
'APP_DEBUG' => 'false',
|
||||
'FIREWALL_ENABLED' => 'true',
|
||||
'MODEL_CACHE_ENABLED' => 'true',
|
||||
]);
|
||||
];
|
||||
|
||||
if (!app()->runningInConsole()) {
|
||||
$env['APP_URL'] = request()->getUriForPath('');
|
||||
}
|
||||
|
||||
static::updateEnv($env);
|
||||
|
||||
// Rename the robots.txt file
|
||||
try {
|
||||
|
@ -50,8 +50,10 @@ class Overrider
|
||||
app()->setLocale(setting('default.locale'));
|
||||
}
|
||||
|
||||
// Set app url dynamically
|
||||
config(['app.url' => url('/')]);
|
||||
// Set app url dynamically if empty
|
||||
if (!config('app.url')) {
|
||||
config(['app.url' => url('/')]);
|
||||
}
|
||||
}
|
||||
|
||||
protected static function loadCurrencies()
|
||||
|
@ -55,7 +55,7 @@ return [
|
||||
|
|
||||
*/
|
||||
|
||||
'url' => env('APP_URL', 'http://localhost'),
|
||||
'url' => env('APP_URL', ''),
|
||||
|
||||
'asset_url' => env('ASSET_URL', null),
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user