| Conditions | 2 |
| Paths | 2 |
| Total Lines | 19 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 6 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 16 | public function handle() |
||
| 17 | { |
||
| 18 | // Name of the Module Folder |
||
| 19 | $module = $this->argument('module'); |
||
| 20 | |||
| 21 | $this->line('Activating Module '.$module); |
||
|
|
|||
| 22 | |||
| 23 | if(file_exists(base_path().'/Modules/'.$module.'/Config/config.php')) |
||
| 24 | { |
||
| 25 | // Create a symbolic link to the module |
||
| 26 | $this->laravel->make('files')->link(base_path().'/Modules/'.$module.'/resources/js', base_path().'/resources/js/Modules/'.$module); |
||
| 27 | $this->info('The Module '.$module.' has been successfully activated'); |
||
| 28 | } |
||
| 29 | else |
||
| 30 | { |
||
| 31 | $this->error('Unable to find the '.$module.' Module. Please verify it is loaded in the correct folder'); |
||
| 32 | } |
||
| 33 | |||
| 34 | return 0; |
||
| 35 | } |
||
| 37 |