fixed #350
This commit is contained in:
app/Console
@ -6,7 +6,7 @@ use App\Events\ModuleInstalled;
|
||||
use App\Models\Module\Module;
|
||||
use App\Models\Module\ModuleHistory;
|
||||
use Illuminate\Console\Command;
|
||||
use Module as LaravelModule;
|
||||
use Symfony\Component\Console\Input\InputArgument;
|
||||
|
||||
class ModuleInstall extends Command
|
||||
{
|
||||
@ -39,7 +39,7 @@ class ModuleInstall extends Command
|
||||
|
||||
$model = Module::create($request);
|
||||
|
||||
$module = LaravelModule::findByAlias($model->alias);
|
||||
$module = $this->laravel['modules']->findByAlias($model->alias);
|
||||
|
||||
$company_id = $this->argument('company_id');
|
||||
|
||||
@ -49,7 +49,7 @@ class ModuleInstall extends Command
|
||||
'module_id' => $model->id,
|
||||
'category' => $module->get('category'),
|
||||
'version' => $module->get('version'),
|
||||
'description' => trans('modules.history.installed', ['module' => $module->get('name')]),
|
||||
'description' => trans('modules.installed', ['module' => $module->get('name')]),
|
||||
];
|
||||
|
||||
ModuleHistory::create($data);
|
||||
@ -62,4 +62,17 @@ class ModuleInstall extends Command
|
||||
|
||||
$this->info('Module installed!');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the console command arguments.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected function getArguments()
|
||||
{
|
||||
return array(
|
||||
array('alias', InputArgument::REQUIRED, 'Module alias.'),
|
||||
array('company_id', InputArgument::REQUIRED, 'Company ID.'),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user