set company id
This commit is contained in:
parent
e3730ed6dd
commit
c809e94763
@ -31,17 +31,21 @@ class ModuleInstall extends Command
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
$alias = $this->argument('alias');
|
||||
$company_id = $this->argument('company_id');
|
||||
|
||||
// Set company id
|
||||
session(['company_id' => $company_id]);
|
||||
|
||||
$request = [
|
||||
'company_id' => $this->argument('company_id'),
|
||||
'alias' => strtolower($this->argument('alias')),
|
||||
'company_id' => $company_id,
|
||||
'alias' => strtolower($alias),
|
||||
'status' => '1',
|
||||
];
|
||||
|
||||
$model = Module::create($request);
|
||||
|
||||
$module = $this->laravel['modules']->findByAlias($model->alias);
|
||||
|
||||
$company_id = $this->argument('company_id');
|
||||
$module = $this->laravel['modules']->findByAlias($alias);
|
||||
|
||||
// Add history
|
||||
$data = [
|
||||
@ -61,7 +65,10 @@ class ModuleInstall extends Command
|
||||
$this->call('migrate', ['--force' => true]);
|
||||
|
||||
// Trigger event
|
||||
event(new ModuleInstalled($model->alias, $company_id));
|
||||
event(new ModuleInstalled($alias, $company_id));
|
||||
|
||||
// Unset company id
|
||||
session()->forget('company_id');
|
||||
|
||||
$this->info('Module installed!');
|
||||
}
|
||||
|
@ -286,8 +286,6 @@ class Item extends Controller
|
||||
* Final actions post update.
|
||||
*
|
||||
* @param $alias
|
||||
* @param $old
|
||||
* @param $new
|
||||
* @return Response
|
||||
*/
|
||||
public function post($alias)
|
||||
|
Loading…
x
Reference in New Issue
Block a user