Execute the console command.

@return mixed
962664
public function handle()
    {
        $this->line('Starting package template initialization...');
        try {
            $directory = $this->argument('directory');

            if (!$this->files->exists($directory)) {
                $createDirectory = $this->confirm("{$directory} does not exist. Would you like to create it? [YES/no]", true);

                if ($createDirectory) {
                    $this->line("{$directory} was created.");
                    $this->files->makeDirectory($directory);
                }
            }

            if ($this->files->exists($directory) && $this->files->isDirectory($directory)) {
                $fileCount = count($this->files->allFiles($directory));

                if ($fileCount > 0) {
                    $removeFiles = $this->confirm("{$directory} is not empty. Would you like to remove the contents? [yes|NO]", false);

                    if ($removeFiles) {
                        $this->line("The contents in '{$directory}' were cleared.");
                        $this->files->deleteDirectory($directory, true);
                    }
                }
            }

            $this->templateInitializer->setShouldCreateTemplateDirectory(!$this->option('no-template-dir'));

            $packageVendor = Package::parseVendorAndPackage($this->argument('name'));
            $this->templateInitializer->initialize($packageVendor[0], $packageVendor[1], $directory);
            $this->info('Package was successfully initialized!');
        } catch (InvalidPathException $invalidPath) {
            $this->error('There was a problem initializing the package template (most likely due to an invalid path). The error was:');
            $this->error($invalidPath->getMessage());
        } catch (InvalidArgumentException $invalidVendorPackage) {
            $this->error('There was a problem initializing the package template');
            $this->error($invalidVendorPackage->getMessage());
        }
    }
920736
public function handle()
    {
        $type = $this->option('type');

        if (! is_null($type) && ! in_array($type, array('package', 'module', 'theme'))) {
            return $this->error("Invalid Packages type [$type].");
        }

        $packages = $this->getPackages($type);

        if (empty($packages)) {
            if (! is_null($type)) {
                return $this->error("Your application doesn't have any Packages of type [$type].");
            }

            return $this->error("Your application doesn't have any Packages.");
        }

        $this->displayPackages($packages);
    }
100345
public function handle()
    {
        $this->currentRoot = trim($this->laravel->getNamespace(), '\\');

        $this->setAppDirectoryNamespace();
        $this->setBootstrapNamespaces();
        $this->setConfigNamespaces();
        $this->setComposerNamespace();
        $this->setDatabaseFactoryNamespaces();

        $this->info('Application namespace set!');

        $this->composer->dumpAutoloads();

        $this->call('optimize:clear');
    }
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);
    }
1328179
public function handle()
    {
        $group = $this->argument('group');
        $json = $this->option('json');

        if (is_null($group) && !$json) {
            $this->warn('You must either specify a group argument or export as --json');

            return;
        }

        if (!is_null($group) && $json) {
            $this->warn('You cannot use both group argument and --json option at the same time');

            return;
        }

        $this->manager->exportTranslations($group, $json);

        if (!is_null($group)) {
            $this->info('Done writing language files for '.(($group == '*') ? 'ALL groups' : $group.' group'));
        } elseif ($json) {
            $this->info('Done writing JSON language files for translation strings');
        }
    }
663244
public function handle()
    {
        $table = $this->laravel['config']['queue.connections.database.table'];

        $this->replaceMigration(
            $this->createBaseMigration($table), $table, Str::studly($table)
        );

        $this->info('Migration created successfully!');

        $this->composer->dumpAutoloads();
    }
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.');
	}
1318798
public function handle()
    {
        $this->laravel->view->addNamespace('settings', __DIR__ . '/../views');

        $this->line('');

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

        $this->line('');
    }
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;
    }
872642
public function handle() {
        \File::copy(__DIR__ . '/../environment/config/filesystems.php', base_path('config/filesystems.php'));
        \Config::set('filesystems.default', 'it');

        $plugin = $this->argument('plugin');
        if (in_array($plugin, $this->plugins)) {
            if ($plugin == 'merge') {
                $this->info('It' . $this->beer . ' preparing file system merge');
                $this->merge();
            } else if ($plugin == 'laravelcollective') {
                $this->laravelcollective();
            } else if ($plugin == 'yajra') {
                $this->yajra();
            } else if ($plugin == 'intervention') {
                $this->intervention();
            }
        } else {
            $plugg = [];

            $this->error('It' . $this->beer . ' Whoops please choose - plugin from list');
            $headers = [
                'Command (php artisan it:install)',
                'Description',
            ];
            foreach ($this->plugins as $plug) {
                if ($plug == 'merge') {
                    $title = 'A Controller File Project to merge your files';
                } elseif ($plug == 'payment') {
                    $title = 'Payment Getway trusted Packages Paypal,Cashu,payfort & much more ... ';
                } elseif ($plug == 'editors') {
                    $title = 'Ckeditor,NiceEdit,jWYSIWYG,summernote,react-rte & much more ...  ';
                } elseif ($plug == 'baboon') {
                    $title = 'Baboon CRUD System (MVC-SD) Created By Mahmoud Ibrahim v1';
                } elseif ($plug == 'laravelcollective') {
                    $title = 'Install Laravel Collective Package (laravelcollective.com) ';
                } elseif ($plug == 'yajra') {
                    $title = 'Install yajra datatable Package (yajrabox.com) ';
                } elseif ($plug == 'intervention') {
                    $title = 'Install intervention Image Package (image.intervention.io) ';
                }
                array_push($plugg, [$plug, $title]);
            }
            $this->table($headers, $plugg);
        }
    }
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));
    }
985381
public function handle()
    {
        $name = $this->parseNameForDirectory($this->argument('name'));

        $headers = $this->generatePluginHeaders($name);

        $this->installPlugin($name);
        $this->setPluginHeaders($name, $headers);
        $this->setPluginRootFile($name);
        $this->setConfigurationFile($name, $headers);
        $this->setTranslationFile($name, $headers);
        $this->setProviders($name, $headers);

        $this->info('Plugin installed successfully.');
    }
781304
public function handle()
    {
        $this->migrator->setConnection($this->option('database'));

        if (!$this->migrator->repositoryExists()) {
            return $this->error('No migrations found.');
        }

        $ran = $this->migrator->getRepository()->getRan();

        if (count($migrations = $this->getStatusFor($ran)) > 0) {
            $this->table(['Ran?', 'Migration'], $migrations);
        } else {
            $this->error('No migrations found');
        }
    }
1103738
public function handle()
    {
        $this->abortCommandExecution();
        if (! $this->argument('action') || $this->argument('action') == 'list') {
            $this->listEnvVariables();
            return;
        }

        if ($this->argument('action') == 'edit') {
            $this->editEnvVariables();
            return;
        }

        if ($this->argument('action') == 'check') {
            $this->checkEnvVariable();
            return;
        }
    }
719297
public function handle()
    {
        $class = config(
            'auth.providers.' . config(
                'auth.guards.' . config(
                    'auth.defaults.guard'
                ) . '.provider'
            ) . '.model'
        );
        $user = new $class;
        $fillables = $user->getFillable();
        foreach($fillables as $key => $fillable) {
            if ($fillable == 'password') {
                $user->password = \Hash::make($this->secret(($key+1) . "/" . count($fillables) . " User $fillable"));
            } else {
                $user->$fillable = $this->ask(($key+1) . "/" . count($fillables) . " User $fillable");
            }
        }
        if ($this->confirm("Do you want to create the user?", true)) {
            $user->save();
            $this->info("User created (id: {$user->id})");
        }

        return true;
    }
1215208
public function handle()
    {
        $translation = $this->dbTransaction(function () {
            $translation = new FileTranslation();
            $translation->fill([
                'title'         => $this->title,
                'language_code' => $this->language->code,
                'description'   => $this->attributes['description']
            ]);
            $translation->author()->associate($this->author);

            $this->file->removeExistingTranslation($translation->language_code);
            $this->file->translations()->save($translation);

            event('file.translation.created', [$translation]);
            return $translation;
        });
        return $translation;
    }
582614
public function handle()
    {
        $app = app();
        $this->version = (int) str_replace('.', '', $app->version());

        // check if module exists
        if ($this->files->exists(app_path().'/Modules/'.studly_case($this->getNameInput()))) {
            return $this->error($this->type.' already exists!');
        }

        // Create Controller
        $this->generate('controller');

        // Create Model
        $this->generate('model');

        // Create Views folder
        $this->generate('view');

        //Flag for no translation
        if (! $this->option('no-translation')) { // Create Translations folder
            $this->generate('translation');
        }

        if ($this->version < 530) {

            // Create Routes file
            $this->generate('routes');
        } else {

            // Create WEB Routes file
            $this->generate('web');
            
            // Create API Routes file
            $this->generate('api');
        }
        
        // Create Helper file
        $this->generate('helper');



        if (! $this->option('no-migration')) {

            // without hacky studly_case function
            // foo-bar results in foo-bar and not in foo_bar
            $table = str_plural(snake_case(studly_case($this->getNameInput())));
            $this->call('make:migration', ['name' => "create_{$table}_table", '--create' => $table]);
        }

        $this->info($this->type.' created successfully.');
    }