PATH:
home
/
lab2454c
/
costbloc.com
/
vendor
/
nwidart
/
laravel-modules
/
src
/
Commands
<?php declare(strict_types=1); namespace Nwidart\Modules\Commands; use Illuminate\Console\Command; use Nwidart\Modules\Contracts\RepositoryInterface; use Nwidart\Modules\Module; class LaravelModulesV6Migrator extends Command { protected $name = 'module:v6:migrate'; protected $description = 'Migrate laravel-modules v5 modules statuses to v6.'; public function handle() : int { $moduleStatuses = []; /** @var RepositoryInterface $modules */ $modules = $this->laravel['modules']; $modules = $modules->all(); /** @var Module $module */ foreach ($modules as $module) { if ($module->json()->get('active') === 1) { $module->enable(); $moduleStatuses[] = [$module->getName(), 'Enabled']; } if ($module->json()->get('active') === 0) { $module->disable(); $moduleStatuses[] = [$module->getName(), 'Disabled']; } } $this->info('All modules have been migrated.'); $this->table(['Module name', 'Status'], $moduleStatuses); return 0; } }
[-] SeedCommand.php
[edit]
[-] DisableCommand.php
[edit]
[-] MigrateResetCommand.php
[edit]
[-] SeedMakeCommand.php
[edit]
[-] MigrateRollbackCommand.php
[edit]
[-] MailMakeCommand.php
[edit]
[-] RouteProviderMakeCommand.php
[edit]
[-] LaravelModulesV6Migrator.php
[edit]
[+]
..
[-] ListCommand.php
[edit]
[-] CommandMakeCommand.php
[edit]
[-] NotificationMakeCommand.php
[edit]
[-] FactoryMakeCommand.php
[edit]
[-] ComponentViewMakeCommand.php
[edit]
[-] SetupCommand.php
[edit]
[-] ResourceMakeCommand.php
[edit]
[-] MigrateRefreshCommand.php
[edit]
[-] PublishTranslationCommand.php
[edit]
[-] MigrateStatusCommand.php
[edit]
[-] ModuleMakeCommand.php
[edit]
[-] ComponentClassMakeCommand.php
[edit]
[-] UpdateCommand.php
[edit]
[-] UseCommand.php
[edit]
[-] PublishMigrationCommand.php
[edit]
[-] RequestMakeCommand.php
[edit]
[-] MigrateFreshCommand.php
[edit]
[-] MigrationMakeCommand.php
[edit]
[-] PublishCommand.php
[edit]
[-] MigrateCommand.php
[edit]
[-] TestMakeCommand.php
[edit]
[-] ModuleDeleteCommand.php
[edit]
[-] RuleMakeCommand.php
[edit]
[-] PolicyMakeCommand.php
[edit]
[-] EnableCommand.php
[edit]
[-] ListenerMakeCommand.php
[edit]
[-] MiddlewareMakeCommand.php
[edit]
[-] InstallCommand.php
[edit]
[-] DumpCommand.php
[edit]
[-] PublishConfigurationCommand.php
[edit]
[-] ModelMakeCommand.php
[edit]
[-] ProviderMakeCommand.php
[edit]
[-] EventMakeCommand.php
[edit]
[-] JobMakeCommand.php
[edit]
[-] GeneratorCommand.php
[edit]
[+]
stubs
[-] ControllerMakeCommand.php
[edit]
[-] UnUseCommand.php
[edit]