Execute the console command.

@return mixed
976766
public function fire()
    {
        try {

            // Potion config
            if ($this->config === false) {
                throw new \Exception('Invalid potion configuration, please run "artisan vendor:publish" in your project root to public the potion config file.');
            }

            // Clean up paths
            $this->config['resource_path'] = rtrim($this->config['resource_path'], '/');
            $this->config['resource_path'] = rtrim($this->config['resource_path'], '\\');
            $this->config['assets_path'] = rtrim($this->config['assets_path'], '/');
            $this->config['assets_path'] = rtrim($this->config['assets_path'], '\\');

            // Log
            $this->info('Making assets using:');
            $this->info("\tResource Path: {$this->config['resource_path']}");
            $this->info("\tAsset Path: {$this->config['assets_path']}");

            // Make the assets path
            if (!$this->makePath($this->config['assets_path'])) {
                throw new \Exception("Unable to make assets_path from config: {$this->config['assets_path']}");
            }

            // Filters
            $filters = [];
            // -- optipng
            $filter = new OptiPngFilter($this->config['filters']['optipng']['path']);
            $filter->setLevel($this->config['filters']['optipng']['level']);
            $filters['optipng'] = $filter;
            // -- jpegoptim
            $filter = new JpegoptimFilter($this->config['filters']['jpegoptim']['path']);
            $filter->setStripAll($this->config['filters']['jpegoptim']['strip']);
            $filter->setMax($this->config['filters']['jpegoptim']['max']);
            $filters['jpegoptim'] = $filter;
            // -- Css import
            $filter = new CssImportFilter();
            $filters['css_import'] = $filter;
            // -- Css rewrite
            $filter = new CssRewriteFilter();
            $filters['css_rewrite'] = $filter;
            // -- Css min
            $filter = new CssMinFilter();
            $filters['css_min'] = $filter;
            // -- Css Yui
            $filter = new CssCompressorFilter($this->config['filters']['css_yui']['path_jar'], $this->config['filters']['css_yui']['path_java']);
            $filters['css_yui'] = $filter;
            // -- CSS LessPHP
            $filter = new LessphpFilter();
            $filter->setLoadPaths($this->config['filters']['css_lessphp']['path_imports']);
            $filter->setFormatter($this->config['filters']['css_lessphp']['format']);
            $filter->setPreserveComments($this->config['filters']['css_lessphp']['preserve_comments']);
            $filters['css_lessphp'] = $filter;
            // -- CSS ScssPHP
            $filter = new ScssphpFilter();
            $filter->setImportPaths($this->config['filters']['css_scssphp']['path_imports']);
            $filter->setFormatter($this->config['filters']['css_scssphp']['format']);
            $filters['css_scssphp'] = $filter;
            // -- JS Min
            $filter = new JSMinFilter();
            $filters['js_min'] = $filter;
            // -- Js Yui
            $filter = new JsCompressorFilter($this->config['filters']['js_yui']['path_jar'], $this->config['filters']['js_yui']['path_java']);
            $filter->setNomunge($this->config['filters']['js_yui']['no_munge']);
            $filter->setPreserveSemi($this->config['filters']['js_yui']['preserve_semi']);
            $filter->setDisableOptimizations($this->config['filters']['js_yui']['disable_opti']);
            $filters['js_yui'] = $filter;

            // Cache
            $cache = [];

            // Each potion
            foreach ($this->config['potions'] as $potion) {

                // -- Find assets
                $resource_filters = [];
                foreach ($potion['filters'] as $filter) {
                    $resource_filters[] = $filters[$filter];
                }

                // -- Asset content
                $asset_content = '';

                // -- Resources
                foreach ($potion['resources'] as $resource) {

                    // -- -- Make full path
                    $resource = ltrim($resource, '/');
                    $resource = ltrim($resource, '\\');
                    $asset_path = $this->config['resource_path'] . DIRECTORY_SEPARATOR . $resource;

                    // -- -- Echo
                    $this->info("Processing resource: {$asset_path}");

                    // -- -- Get path info
                    $pathinfo = pathinfo($asset_path);

                    // -- -- File assets
                    $file_assets = [];

                    // -- -- Glob?
                    if ($pathinfo['extension'] == '*' || $pathinfo['filename'] == '*') {

                        // -- -- -- Get all file assets
                        $glob = new GlobAsset($asset_path, $resource_filters);
                        foreach ($glob->all() as $file_asset) {
                            $file_assets[] = new FileAsset(rtrim($file_asset->getSourceRoot(), DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . $file_asset->getSourcePath(), $resource_filters);
                        }
                    }
                    else {
                        $file_assets[] = new FileAsset($asset_path, $resource_filters);
                    }

                    // -- -- Each file asset
                    foreach ($file_assets as $file_asset) {

                        // -- -- -- File
                        $file_path = $this->config['assets_path'] . DIRECTORY_SEPARATOR . $file_asset->getSourcePath();

                        // -- -- -- Echo
                        $this->info("Processing resource file: {$file_path}");

                        // -- -- -- Make file, or combine
                        if ($potion['output'] !== false) {
                            $asset_content .= $file_asset->dump();
                        }
                        else {

                            // -- -- -- -- Echo
                            $this->info("Writing asset file: {$file_path}");

                            // -- -- -- -- Write
                            if (file_put_contents($file_path, $file_asset->dump()) === false) {
                                $this->error("Error writing asset file: {$file_path}");
                            }

                            // -- -- -- -- Add to cache
                            $cache[$file_asset->getSourcePath()] = $this->versionFile($file_path);
                        }
                    }
                }

                // -- Combine to a single file
                if ($potion['output'] !== false) {

                    // -- -- Write to file
                    $file_path = $this->config['assets_path'] . DIRECTORY_SEPARATOR . $potion['output'];

                    // -- -- Echo
                    $this->info("Writing asset file: {$file_path}");

                    // -- -- Write
                    if (file_put_contents($file_path, $asset_content) === false) {
                        $this->error("Error writing asset file: {$file_path}");
                    }

                    // -- -- Add to cache
                    $cache[$potion['output']] = $this->versionFile($file_path);
                }
            }

            // Set cache
            Cache::forever('potion_assets', $cache);

        }
        catch (\Exception $e) {

            // Echo
            $this->error($e->getMessage());

        }
    }
681188
public function handle()
	{
		if ($this->files->isDirectory($this->getPath(null))){
			return $this->error('Theme "'.$this->getTheme().'" is already exists.');
		}

		$this->makeDirs([
						'assets/css',
						'assets/js',
						'assets/img',
						'layouts',
						'partials/sections',
						'views',
						'widgets',
						]);

		$this->makeFiles([
						'layout.blade.php'	=> 'layouts/',
						'header.blade.php'	=> 'partials/',
						'footer.blade.php'	=> 'partials/',
						'main.blade.php'	=> 'partials/sections/',
						'index.blade.php'	=> 'views/',
						'style.css'			=> 'assets/css/',
						'script.js'			=> 'assets/js/',
						'theme.json'		=> '',
						'gulpfile.js'		=> '',
						'config.php'		=> ''
						]);

		$this->info('Theme "'.$this->getTheme().'" has been created.');
	}
281194
public function handle()
    {
        $params = [
            'tables'   => $this->argument('tables'),
            '--tables' => $this->option('tables'),
            '--ignore' => $this->option('ignore'),
        ];

        $this->call('generator:make:migration', $params);

        $params['--models'] = $this->option('models');

        $this->call('generator:make:scaffold', $params);

        $this->call('generator:make:factory', $params);
    }
487870
public function handle()
    {
        $arguments = $this->argument();
        $option = $this->option();
        $options = [];

        array_walk($option, function (&$value, $key) use (&$options) {
            $options['--' . $key] = $value;
        });

        unset($arguments['slug']);
        unset($options['--location']);

        $modulePath = module_path($this->argument('slug'), 'Database/Migrations', $this->option('location'));
        $options['--path'] = str_replace(realpath(base_path()), '', realpath($modulePath));
        $options['--path'] = ltrim($options['--path'], '/');

        return $this->call('make:migration', array_merge($arguments, $options));
    }
274449
public function handle()
    {
        if (! $this->confirmToProceed()) {
            return;
        }

        $driver = $this->getDriver();
        $database = $this->option('database');
        $id = $this->option('id');
        $pretend = $this->option('pretend', false);

        $this->prepareDatabase($driver, $database, $id);

        $migrator = $this->tenant->driver($driver);

        $this->setupMigrationOutput($migrator);

        $migrator->run($database, $id, $pretend);
    }
190397
public function handle()
    {
        $this->info(sprintf('%s (v%s)', config('setup.title'), self::VERSION));

        $pretend = (bool) $this->option('pretend');
        $steps   = (array) $this->argument('step');
        $return  = $this->runSteps($steps, $pretend);

        $this->info('Setup finished.');

        return $return;
    }
1133668
public function handle()
    {
        $exists = false;

        if (File::exists($this->publishedMigrationRealpath())) {
            $exists = true;

            if (!$this->confirm('The migration file already exists, overwrite it? [Yes|no]')) {
                return $this->info('Okay, no changes made to the file.');
            }
        }

        $inputFile = file_get_contents($this->localMigrationRealpath());

        $outputFile = fopen($this->publishedMigrationRealpath(), 'w');

        if ($inputFile && $outputFile) {
            fwrite($outputFile, $inputFile);

            fclose($outputFile);
        } else {
            File::delete($this->publishedMigrationRealpath());

            return $this->error(
                        'There was an error creating the migration file, '
                        .'check write permissions for ' . base_path('database') . DIRECTORY_SEPARATOR . 'migrations'
                        .PHP_EOL
                        .PHP_EOL
                        .'If you think this is a bug, please submit a bug report '
                        .'at https://github.com/moharrum/laravel-geoip-world-cities/issues'
                    );
        }

        if(! $exists) {
            $this->info('Okay, migration file created successfully.');

            return;
        }

        $this->info('Okay, migration file overwritten successfully.');
    }
788981
public function handle()
    {
        $sql = $this->option('command');
        $connection = $this->databaseManager->connection($this->option('connection'));
        $rows = $this->castArray($connection->select($sql, [], true));
        $headers = array_keys(Arr::get($rows, 0, []));
        $this->table($headers, $rows);
    }
12692
public function handle()
    {
        $filesystem = new Filesystem;
        $filesystem->copyDirectory(
            __DIR__ . '/stubs/install',
            base_path()
        );
        $this->call('storage:link');

        if ($this->option('migrate')) {
            $this->call('migrate', ['--path' => str_replace(base_path(), '', __DIR__) . '/../../migrations']);
            $this->call('db:seed', ['--class' => \Kaiwh\Admin\Seeds\InitAdminSeeder::class]);
        }
    }
576974
public function handle()
    {
        // Retrieve attributes
        $attributes = config('commands.user_attributes');

        // Retrieve sensitive fields
        $sensitive_attributes = config('commands.user_attributes_sensitive');

        // Ask questions and prepare data
        foreach ($attributes as $attribute => $question) {
            if (is_null($attribute) || $attribute === 0) {
                $attribute = $question;
            }

            // Check if sensitive field
            if (in_array($attribute, $sensitive_attributes)) {
                $attributes[$attribute] = Hash::make($this->secret($question));
                continue;
            }

            $attributes[$attribute] = $this->ask($question);
        }

        // Create new user
        try {
            $user = App::make(config('commands.user'));
            $user::create($attributes);
            $this->info('User created');
        } catch (\Exception $exception) {
            $this->error($exception->getMessage());
        }
    }
1143649
public function handle()
    {
        try {
            $this->filesystem->make(
                $path = resource_path('views/' . $this->viewPath()),
                $this->filesystem->get($this->getStubPath()),
                true
            );
            $this->info('File ' . $path . ' created');
        } catch (\Exception $e) {
            $this->error($e->getMessage());
        }
    }
494568
public function handle()
	{
		if( ( $code = $this->argument( 'email' ) ) === null ) {
			$code = $this->ask( 'E-Mail' );
		}

		if( ( $password = $this->option( 'password' ) ) === null ) {
			$password = $this->secret( 'Password' );
		}

		$context = $this->getLaravel()->make( 'Aimeos\Shop\Base\Context' )->get( false, 'command' );
		$context->setEditor( 'aimeos:account' );

		$localeManager = \Aimeos\MShop::create( $context, 'locale' );
		$localeItem = $localeManager->bootstrap( $this->argument( 'site' ), '', '', false );
		$context->setLocale( $localeItem );

		$this->addGroups( $context, $this->createCustomerItem( $context, $code, $password ) );
	}
388784
public function handle()
    {
        // Load Data
        $stats   = $this->logViewer->statsTable('en');

        $rows    = $stats->rows();
        $rows[]  = $this->tableSeparator();
        $rows[]  = $this->prepareFooter($stats);

        // Display Data
        $this->displayLogViewer();
        $this->table($stats->header(), $rows);
    }
635532
public function handle()
	{
		$theme = strtolower($this->argument('name'));
		$new_theme = strtolower($this->argument('new-name'));

		$theme_path = $this->getPath($theme);
		$new_theme_path = $this->getPath($new_theme);

		if(!$this->files->isDirectory($theme_path)){
			return $this->error('Theme "'.$theme.'" does not exist.');
		}

		if($this->files->isDirectory($new_theme_path)){
			return $this->error('Theme "'.$new_theme.'" is already exists.');
		}

		$this->files->copyDirectory($theme_path, $new_theme_path);

		$this->info('Theme "'.$new_theme.'" has been created.');
	}
236846
public function handle()
    {
        $this->basePath = $this->getMigrationPath();
        $migrations = $this->migrator->getMigrationFiles($this->basePath);
        $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);
            // Move the migration into base migration folder
            $this->files->move($this->basePath.'/'.$datePath.$migration_name.'.php', $this->basePath.'/'.$migration_name.'.php');
        }

        $this->info('Migrations disorganised successfully ('.$count.' migrations moved)');
        $this->cleanup();
    }
848963
public function handle()
    {

        $connection = $this->option("connection") ? $this->option("connection") : config("es.default");

        $indices = $this->es->connection($connection)->raw()->cat()->indices();

        if (is_array($indices)) {
            $indices = $this->getIndicesFromArrayResponse($indices);
        } else {
            $indices = $this->getIndicesFromStringResponse($indices);
        }

        if (count($indices)) {
            $this->table($this->headers, $indices);
        } else {
            $this->warn('No indices found.');
        }

    }
1019657
public function handle()
    {
        if (!file_exists(base_path('.env'))) {
            $this->error('File .env not found');
            return false;
        }
        if (config('app.key') == '') {
            $this->info('Key Generate...');
            $this->call('key:generate');
        }
        if (!is_link(public_path('storage'))) {
            $this->info('Storage Link...');
            $this->call('storage:link');
        }
        if (!file_exists(app_path('Http/Controllers/HomeController.php')) && $this->confirm('Do you want to run make:auth?')) {
            $this->info('Make Auth...');
            $this->call('make:auth');
        }
        $this->info('Migrate and Seeding...');
        if ($this->option('migrate-fresh')) {
            $this->call('migrate:fresh', [ '--seed' => true ]);
        } elseif ($this->option('migrate-refresh')) {
            $this->call('migrate:refresh', [ '--seed' => true ]);
        } else {
            $this->call('migrate', [ '--seed' => true ]);
        }
        if (!file_exists(storage_path('oauth-private.key')) || !file_exists(storage_path('oauth-public.key'))) {
            $this->info('Passport Key Generate...');
            $this->call('passport:install');
        }

        return true;
    }