improved finish update command
This commit is contained in:
parent
110fe689f7
commit
5aec5260d0
@ -3,7 +3,6 @@
|
|||||||
namespace App\Console\Commands;
|
namespace App\Console\Commands;
|
||||||
|
|
||||||
use App\Events\Install\UpdateFinished;
|
use App\Events\Install\UpdateFinished;
|
||||||
use App\Models\Common\Company;
|
|
||||||
use Illuminate\Console\Command;
|
use Illuminate\Console\Command;
|
||||||
|
|
||||||
class FinishUpdate extends Command
|
class FinishUpdate extends Command
|
||||||
@ -48,16 +47,18 @@ class FinishUpdate extends Command
|
|||||||
throw new \Exception(trans('modules.errors.finish', ['module' => $alias]));
|
throw new \Exception(trans('modules.errors.finish', ['module' => $alias]));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set locale for modules
|
$company = company($company_id);
|
||||||
if ($alias != 'core') {
|
|
||||||
$company = Company::find($company_id);
|
|
||||||
|
|
||||||
if (!empty($company->locale)) {
|
if (empty($company)) {
|
||||||
app()->setLocale($company->locale);
|
return;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
company($company_id)->makeCurrent();
|
$company->makeCurrent();
|
||||||
|
|
||||||
|
// Set locale for modules
|
||||||
|
if (($alias != 'core') && !empty($company->locale)) {
|
||||||
|
app()->setLocale($company->locale);
|
||||||
|
}
|
||||||
|
|
||||||
// Disable model cache during update
|
// Disable model cache during update
|
||||||
config(['laravel-model-caching.enabled' => false]);
|
config(['laravel-model-caching.enabled' => false]);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user