Execute the console command.

@param  \Laravel\Horizon\Contracts\MasterSupervisorRepository  $masters
@return void
502727
public function handle(MasterSupervisorRepository $masters)
    {
        $masters = collect($masters->all())->filter(function ($master) {
            return Str::startsWith($master->name, MasterSupervisor::basename());
        })->all();

        foreach (Arr::pluck($masters, 'pid') as $processId) {
            $this->info("Sending USR2 Signal To Process: {$processId}");

            if (! posix_kill($processId, SIGUSR2)) {
                $this->error("Failed to kill process: {$processId} (".posix_strerror(posix_get_last_error()).')');
            }
        }
    }
685981
public function handle()
    {
        if ($module = $this->argument('module')) {
            $this->publishConfiguration($module);

            return;
        }

        foreach ($this->laravel['modules']->allEnabled() as $module) {
            $this->publishConfiguration($module->getName());
        }
    }
990694
public function handle()
    {

        $this->masterName = $this->argument('MasterPageName');
        $this->appName = $this->argument('AppName');

        $this->setFileNamesAndPaths();


        if ( $this->makeLayoutsFolder()->makeMasterFiles() ) {

            $this->sendSuccessMessage();

            return;

        }

        $this->error('Oops, something went wrong!');


    }
1213733
public function handle()
    {
        $basePath = $this->getMigrationPath();
        $migrations = $this->migrator->getMigrationFiles($basePath, false);
        $count = count($migrations);

        if ($count == 0) {
            $this->comment('No migrations to move');

            return;
        }

        foreach ($migrations as $migration_name => $migration_path) {
            $datePath = $this->migrator->getDateFolderStructure($migration_name);

            // Create folder if it does not already exist
            if (! $this->files->exists($basePath.'/'.$datePath)) {
                $this->files->makeDirectory($basePath.'/'.$datePath, 0775, true);
            }

            // Move the migration into its new folder
            $this->files->move($basePath.'/'.$migration_name.'.php', $basePath.'/'.$datePath.$migration_name.'.php');
        }

        $this->info('Migrations organised successfully ('.$count.' migrations moved)');
    }
737116
public function handle()
    {
        if (! $this->confirmToProceed()) {
            return;
        }

        \tap($this->tenant->driver($this->getDriver()), function ($migrator) {
            $this->setupMigrationOutput($migrator);

            $migrator->reset(
                $this->option('database'), $this->option('id'), $this->option('pretend', false)
            );
        });
    }
1216875
public function handle()
    {
        $this->makeDir('Settings');

        $namespace = NameResolver::getAppNamespace().'Settings';

        $resourceName = ucfirst($this->argument('resource'));

        $this->writeConfig($namespace, $resourceName);

        $this->info("{$resourceName} settings file successfully created!");
    }
1038586
public function handle()
    {
        $identifier = strtolower($this->getIdentifierInput());
        $module = Module::get($identifier);
        $provider = $module->namespace() . 'Module';
        $this->call('vendor:publish', ['--provider' => $provider]);
        $path = $module->basePath() . DIRECTORY_SEPARATOR . 'database/migrations';
        $this->migrator->run($path);

        foreach ($this->migrator->getNotes() as $note) {
            $this->output->writeln($note);
        }
        $this->info('Module:' . $module->name() . ' has been installed successfully.');
    }
563054
public function handle()
    {
        // Next, we will check to see if a path option has been defined. If it has
        // we will use the path relative to the root of this installation folder
        // so that migrations may be run for any path within the applications.
        $this->deployer->run($this->getDeployPaths(), []);

        // Once the migrator has run we will grab the note output and send it out to
        // the console screen, since the migrator itself functions without having
        // any instances of the OutputInterface contract passed into the class.
        foreach ($this->deployer->getNotes() as $note) {
            $this->output->writeln($note);
        }
    }
700494
public function handle() {
        $role       = Role::admin();
        $brands     = Brands::all();
        $core       = Component::findByVendorAndName('antaresproject', 'core');
        $actions    = $this->getActions($core);

        foreach($brands as $brand) {
            $this->removePermissions($brand, $role, $core);

            foreach($actions as $action) {
                $this->setActionToBrand($brand, $role, $action);
            }
        }

        $this->info('The core permissions has been successfully reloaded.');
    }
522742
public function fire()
    {
        $this->comment('Regeneration of assets collections...');
        $directories = $this->getDirectories();
        if (empty($directories)) {
            $this->comment('no directories to scan, abort');

            return;
        }

        //dd($directories);
        $scanner = $this->getScanner();

        $scanner->setDirectoriesToScan($directories);

        $scanner->scan();
        $added = $scanner->getNewlyBuildedCollections();
        $removed = $scanner->getRemovedBuildedCollections();
        if (count($added) > 0) {
            $this->comment('added collections : '.implode(', ', $added));
        }
        if (count($removed) > 0) {
            $this->comment('removed collections : '.implode(', ', $removed));
        }
        if ((count($added) + count($removed)) > 0 && $this->option('silent') !== true) {
            $update = $this->ask('Update Assets groups with the new or removed collections ? y/n', 'y');
            $this->comment('sorry in the new release ;)');
        }
        $this->comment('done');
    }
919304
public function handle()
    {
        try {
            $this->templateBuilder->setTemplateName($this->argument('newup-template'));
            $this->templateBuilder->setTemplateDirectory($this->option('newup-directory'));
            $this->templateBuilder->setOutputDirectory($this->argument('newup-output-directory'));

            if (!$this->templateBuilder->getPackage()->isQuiet()) {
                $this->line('Preparing to build template package: '.$this->argument('newup-template').'...');
            }

            // Set the arguments and options for the package builder, etc.
            $this->templateBuilder->setOptions($this->input->getOptions());
            $this->templateBuilder->setArguments($this->input->getArguments());

            $this->templateBuilder->build();
            if (!$this->templateBuilder->getPackage()->isQuiet()) {
                $this->info($this->argument('newup-template').' was successfully built.');
            }
        } catch (\Exception $e) {
            $this->error($e->getTraceAsString());
            $this->error($e->getMessage(), $e->getLine(), $e->getFile());
        }
    }
233096
public function handle()
    {
        if (!Config::get('laratrust.use_teams')) {
            $this->error('Not using teams in your Laratrust configuration file.');
            $this->warn('Please enable the teams usage in your configuration.');
            return;
        }

        $this->laravel->view->addNamespace('laratrust', __DIR__ . '/../../views');

        $this->line('');
        $this->info("The Laratrust teams feature setup is going to add a migration and a model");

        $existingMigrations = $this->alreadyExistingMigrations();

        if ($existingMigrations) {
            $this->line('');

            $this->warn($this->getExistingMigrationsWarning($existingMigrations));
        }

        $this->line('');

        if (! $this->confirm("Proceed with the migration creation?", "yes")) {
            return;
        }

        $this->line('');

        $this->line("Creating migration");

        if ($this->createMigration()) {
            $this->info("Migration created successfully.");
        } else {
            $this->error(
                "Couldn't create migration.\n".
                "Check the write permissions within the database/migrations directory."
            );
        }

        $this->line('Creating Team model');
        $this->call('laratrust:team');

        $this->line('');
    }
378474
public function handle(MasterBuilder $builder)
    {

        $masterPageName = $this->argument('MasterPageName');
        $appName = $this->argument('AppName');

        $builder->setFileNamesAndPaths($masterPageName, $appName);


        if ( $this->makeLayoutsFolder() && $builder->makeMasterFiles() ) {

            $this->sendSuccessMessage();

            return;

        }

        $this->error('Oops, something went wrong!');


    }
1044170
public function handle()
    {
        $services = $this->app->config('provider');

        if(!is_null($services)) {
            $published = false;

            foreach($services as $service) {
                $publishableItems = $this->app->make($service)->publish();

                if($this->publishItems($publishableItems)) {
                    $published = true;
                }
            }

            if($published) {
                $this->info("Package assets has been published.");
            } else {
                $this->info("Package assets already published.");
            }
        }
    }
144454
public function handle(MasterSupervisorLooped $event)
    {
        $master = $event->master;

        if ($master->memoryUsage() > config('horizon.memory_limit', 64)) {
            $master->terminate(12);
        }
    }
487289
public function handle()
    {
        $this->repository->setSource($this->input->getOption('database'));

        $this->repository->createRepository();

        $this->info('Migration table created successfully.');
    }
896657
public function handle()
    {
        if (! $this->confirmToProceed()) {
            return;
        }

        $this->resolver->setDefaultConnection($this->getDatabase());

        $this->getSeeder()->run();
    }