Execute the console command.

@param ConfigurationProvider $provider
775422
public function handle(ConfigurationProvider $provider)
    {
        if (!$this->confirmToProceed()) {
            return;
        }
        
        $configuration = $provider->getForConnection(
            $this->option('connection')
        );
        $this->connection = $configuration->getConnection();

        $this->safelyDropTables();

        $this->info('Database was reset');
    }
685981
public function handle()
    {
        if ($module = $this->argument('module')) {
            $this->publishConfiguration($module);

            return;
        }

        foreach ($this->laravel['modules']->allEnabled() as $module) {
            $this->publishConfiguration($module->getName());
        }
    }
991972
public function handle(
        ConfigurationProvider $provider,
        ManagerRegistry $registry,
        SqlBuilder $builder,
        MigrationFileGenerator $generator
    ) {
        $configuration = $provider->getForConnection($this->option('connection'));
        $em            = $registry->getManager($this->option('connection'));
        $connection    = $configuration->getConnection();

        // Overrule the filter
        if ($filterExpr = $this->option('filter-expression')) {
            $connection->getConfiguration()->setFilterSchemaAssetsExpression($filterExpr);
        }

        $fromSchema = $connection->getSchemaManager()->createSchema();
        $toSchema   = $this->getSchemaProvider($em)->createSchema();

        // Drop tables which don't suffice to the filter regex
        if ($filterExpr = $connection->getConfiguration()->getFilterSchemaAssetsExpression()) {
            foreach ($toSchema->getTables() as $table) {
                $tableName = $table->getName();
                if (!preg_match($filterExpr, $this->resolveTableName($tableName))) {
                    $toSchema->dropTable($tableName);
                }
            }
        }

        $up   = $builder->up($configuration, $fromSchema, $toSchema);
        $down = $builder->down($configuration, $fromSchema, $toSchema);

        if (!$up && !$down) {
            return $this->error('No changes detected in your mapping information.');
        }

        $path = $generator->generate(
            $configuration,
            false,
            false,
            $up,
            $down
        );

        $this->line(sprintf('Generated new migration class to "<info>%s</info>" from schema differences.', $path));
    }
1002965
public function handle()
    {
        if (file_exists(base_path() . '/vendor/compiled.php') ||
            file_exists(base_path() . '/bootstrap/cache/compiled.php') ||
            file_exists(base_path() . '/storage/framework/compiled.php')) {
            $this->error(
                'Error generating IDE Helper: first delete your compiled file (php artisan clear-compiled)'
            );
        } else {
            $filename = $this->argument('filename');
            $format = $this->option('format');

            // Strip the php extension
            if (substr($filename, -4, 4) == '.php') {
                $filename = substr($filename, 0, -4);
            }

            $filename .= '.' . $format;

            if ($this->option('memory')) {
                $this->useMemoryDriver();
            }


            $helpers = '';
            if ($this->option('helpers') || ($this->config->get('ide-helper.include_helpers'))) {
                foreach ($this->config->get('ide-helper.helper_files', array()) as $helper) {
                    if (file_exists($helper)) {
                        $helpers .= str_replace(array('<?php', '?>'), '', $this->files->get($helper));
                    }
                }
            } else {
                $helpers = '';
            }

            $generator = new Generator($this->config, $this->view, $this->getOutput(), $helpers);
            $content = $generator->generate($format);
            $written = $this->files->put($filename, $content);

            if ($written !== false) {
                $this->info("A new helper file was written to $filename");

                if ($this->option('write_mixins')) {
                    Eloquent::writeEloquentModelHelper($this, $this->files);
                }
            } else {
                $this->error("The helper file could not be created at $filename");
            }
        }
    }
613042
public function register()
    {

        $app = $this->app;

        foreach ($app->getProviders() as $provider) {

            $provider = new $provider($app);

            if (!$provider instanceof ServiceProvider) {
                throw new ProviderException(sprintf('Your %s proiver must be a instance of ServiceProvider', get_class($provider)));
            }


            $provider->register();

            $app = $provider->app();
        }
    }
673443
public function handle()
    {
        $providers = $this->laravel->getProviders(EventServiceProvider::class);

        foreach ($providers as $provider) {
            foreach ($provider->listens() as $event => $listeners) {
                $this->makeEventAndListeners($event, $listeners);
            }
        }

        $this->info('Events and listeners generated successfully!');
    }
850670
public function handle()
    {
        $package = $this->input->getArgument('package');

        // Direct specification of the package and Views path.
        if (! is_null($path = $this->getPath())) {
            $this->publisher->publish($package, $path);
        }

        // For the packages which are registered as plugins.
        else if ($this->plugins->exists($package)) {
            if (Str::length($package) > 3) {
                $slug = Str::snake($package);
            } else {
                $slug = Str::lower($package);
            }

            $properties = $this->plugins->where('slug', $slug);

            //
            $package = $properties['name'];

            if ($properties['type'] == 'package') {
                $path = $properties['path'] .str_replace('/', DS, '/src/Views');
            } else {
                $path = $properties['path'] .DS . 'Views';
            }

            $this->publisher->publish($package, $path);
        }

        // For other packages located in vendor.
        else {
            $this->publisher->publishPackage($package);
        }

        $this->output->writeln('<info>Views published for package:</info> '.$package);
    }
920883
public function handle()
    {
        // If the package is not installed, abort removal
        if ( ! $this->packageIsInstalled()) {
            return $this->abortRemoval();
        }

        $this->startProgressBar();

        $this->removeConfigArrays();
        $this->replaceRouteServiceProvider();
        $this->removeLanguageMiddleware();
        $this->unregisterLanguageMiddleware();

        $this->stopProgressBar();
    }
853438
public function fire()
    {
        $section = $this->argument('section');
        if (!empty($section)) {
            if (!Config::has($section)) {
                $this->error($section . ' does not exist in your configuration.');
                return;
            }

            // If the requested string is a string, and not something that can be displayed in a table, then just print
            // it out in the console.
            $config = Config::get($section);
            if (!is_array($config)) {
                $this->line('<comment>' . $config . '</comment>');
                return;
            }

            $configs = [
                $section => $config
            ];
        } else {
            $configs = Config::all();
            ksort($configs);
        }

        foreach ($configs as $section => $config) {
            $depth = $this->getConfigDepth($config);
            $tree = $this->generateTree($config, $depth);

            $this->line('<info>Configuration:</info> <comment>' . $section . '</comment>');
            $this->table([/* don't display any headers */], $tree, 'default');
        }
    }
443275
public function handle()
    {
        if(file_exists($filename = $this->app->configurationCacheFilePath())) {
            $this->filesystem->delete($filename);
        }

        $this->info('Configuration cache cleared.');
    }
455521
public function injectConfigurationManager(ConfigurationManager $configurationManager): void
    {
        $this->configurationManager = $configurationManager;
        $this->parseConfigurationOptionPath($this->settingComparisonExpression);
    }
228747
public function handle()
    {
        if (!$this->confirmToProceed()) {
            return;
        }

        $this->prepareDatabase();

        // 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->migrator->run($this->getMigrationPaths(), [
            'pretend' => $this->option('pretend'),
            'step' => $this->option('step'),
        ]);
		
        // 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->getMigratorNotes() as $note) {
            $this->output->writeln($note);
        }

        // Finally, if the "seed" option has been given, we will re-run the database
        // seed task to re-populate the database, which is convenient when adding
        // a migration and a seed at the same time, as it is only this command.
        if ($this->option('seed')) {
            $this->call('db:seed', ['--force' => true]);
        }
    }
493342
public function fire()
	{
		$provider = $this->laravel->getProvider(
			'Illuminate\Foundation\Support\Providers\EventServiceProvider'
		);

		foreach ($provider->listens() as $event => $handlers)
		{
			if ( ! str_contains($event, '\\'))
				continue;

			$this->callSilent('make:event', ['name' => $event]);

			foreach ($handlers as $handler)
			{
				$this->callSilent('handler:event', ['name' => $handler, '--event' => $event]);
			}
		}

		$this->info('Events and handlers generated successfully!');
	}
371298
public function fire()
	{
		$configurator = new Configurator($this);
		$configurator->configure(
			$this->argument('app-id'),
			$this->option('config'),
			$this->option('bucket'));
	}
177747
public function handle()
    {
        $this->module = strtolower($this->argument('module'));
        if (!is_dir(base_path('vendor/typicms/'.$this->module))) {
            throw new Exception('Module “'.$this->module.'” not found in vendor directory.');
        }
        $provider = 'TypiCMS\Modules\\'.ucfirst($this->module).'\Providers\ModuleProvider';
        if (class_exists($provider)) {
            $this->call('vendor:publish', ['--provider' => $provider]);
            $this->publishModule();
            $this->moveMigrationFiles();
            $this->uninstallFromComposer();
        } else {
            throw new Exception($provider.' not found, did you add it to config/app.php?');
        }
    }
1239432
public function handle()
    {
        $name = $this->argument('name');

        if ($this->option('model')) {
            $this->call('make:model', ['name' => $this->option('model')]);
            
        }

        parent::handle();
        if (!str_contains($name, '\\')) {
            $name = '\\App\\Observers\\'. $name;
        }

        if ($this->files->exists(app_path('/Providers/EloquentEventServiceProvider.php')) && $this->option('model')) {
            $provider = $this->files->get(app_path('/Providers/EloquentEventServiceProvider.php'));
            $replacement = str_replace_last(
                'class);',
                "class);\n\t\t{$this->option('model')}::observe($name::class);",
                $provider
            );

            $this->files->put(app_path('/Providers/EloquentEventServiceProvider.php'), $replacement);
        }
        if ($this->option('model') && !$this->files->exists(app_path('/Providers/EloquentEventServiceProvider.php'))) {
            $this->call('make:provider', ['name' => 'EloquentEventServiceProvider']);

            $provider = $this->files->get(app_path('/Providers/EloquentEventServiceProvider.php'));
            $replacement = str_replace('public function boot()
    {
        //', "public function boot()\n\t{\n\t\t{$this->option('model')}::observe($name::class);", $provider);
            $this->files->put(app_path('/Providers/EloquentEventServiceProvider.php'), $replacement);

            $this->registerProvider();
        }
    }
995479
public function handle()
    {
        $repository_generator = new \CroudTech\Repositories\RepositoryGenerator($this->argument('model-name'), $this->argument('repository-name'));

        try {
            if ($repository_generator->generateRepository()) {
                $this->info(sprintf('Generated %s repository', $repository_generator->getFullRepositoryPath()));
                $this->info(sprintf('Using %s contract', $repository_generator->getFullContractPath()));
            } else {
                $this->error('Repository generation failed.');
            }
        } catch (\Exception $e) {
            $this->error('There was an error when generating the repository. Please check your error log.');
            \Illuminate\Support\Facades\Log::error($e);
        }
    }