Skip to content

Commit

Permalink
Module instal after missing company_id
Browse files Browse the repository at this point in the history
  • Loading branch information
cuneytsenturk committed Dec 25, 2018
1 parent d384244 commit c5003d5
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions app/Console/Commands/ModuleInstall.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ public function handle()
$alias = $this->argument('alias');
$company_id = $this->argument('company_id');

$old_company_id = session('company_id');

// Set company id
session(['company_id' => $company_id]);

Expand Down Expand Up @@ -70,6 +72,11 @@ public function handle()
// Unset company id
session()->forget('company_id');

// Set company id
if (!empty($old_company_id)) {
session(['company_id' => $old_company_id]);
}

$this->info('Module installed!');
}

Expand Down

0 comments on commit c5003d5

Please sign in to comment.