Execute the console command.

@throws \Exception
552990
public function handle()
    {
        set_time_limit(900);

        $this->clearCaches();

        if($this->isInstalled()) {
            return false;
        }

        if(!$this->requirements->check($this)) {
            return false;
        }

        $this
            ->welcomeMessage()
            ->setBar()
            ->askInstallingQuestions()
            ->renameEnvFile()
            ->setEnvValues()
            ->saveConfiguration()
            ->generateKey()
            ->deleteUploads()
            ->runMigration()
            ->createDummyContent()
            ->createDefaultTheme()
            ->successfullyInstalled();
        return;
    }
1011598
public function handle()
    {

        $command = $this->argument('function') ? $this->argument('function') : 'create';
        $param = $this->argument('params') ? $this->argument('params') : '';
        if (is_callable([$this, $command])) {
            $this->$command($param);
        } else {
            $this->error(sprintf('%s command not found', $command));
        }
    }
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());
        }
    }
316506
public function handle()
    {
        $rootDirectory = $this->argument('directory') ?? '';

        if( $rootDirectory == '' ) {

            $files = $this->getConfigFiles();

            foreach ( $files as $file )
                $this->generateRoutes(realpath(implode('/', array_slice(explode('/', $file), 0, -3))) . '/');
        } else
            $this->generateRoutes($rootDirectory);
    }
939067
public function handle()
    {
        if (!$this->confirmToProceed()) {
            return;
        }

        $this->call('mapping:reset', [
            '--database' => $this->option('database'),
            '--force'    => true,
        ]);

        $this->call('mapping:run', [
            '--index'    => $this->option('index'),
            '--database' => $this->option('database'),
            '--force'    => true,
        ]);
    }
499458
public function handle() {
		\Config::set('filesystems.default', 'it');

		//$this->option('plugin');
		$plugin = $this->argument('plugin');
		if (in_array($plugin, $this->plugins)) {
			if ($plugin == 'merge') {
				$this->info('It'.$this->beer.' preparing file system merge to remove');
				$this->uninstall_merge();

			} else if ($plugin == 'laravelcollective') {
				$this->uninstall_laravelcollective();
			} else if ($plugin == 'yajra') {
				$this->yajra();
			} else if ($plugin == 'intervention') {
				$this->intervention();
			}
		} else {
			$plugg = [];

			$this->error('It'.$this->beer.' Ops Choose Plugin From List ');
			$headers = [
				'Command (php artisan it:uninstall)',
				'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 Created By Mahmoud Ibrahim v1';
				} elseif ($plug == 'yajra') {
					$title = 'Yajra DataTables by yajrabox.com';
				} elseif ($plug == 'intervention') {
					$title = 'intervention Image Package (image.intervention.io) ';
				}
				array_push($plugg, [$plug, $title]);
			}
			$this->table($headers, $plugg);
		}
	}
1207885
public function handle()
    {
        $this->line('Processing...');

        //get command arguments
        $message = $this->argument('message');
        $to      = $this->argument('to');
        $attach  = $this->argument('attach');

        //init client
        $this->initClient();

        //attach data
        $this->addAttachment($attach);

        //add to
        $this->addTo($to);

        //send
        $this->send($message);

        $this->info('Message sent');
    }
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 ) );
	}
204100
public function fire()
    {
        $config_phar = base_path('phar.json');
        if (! $this->files->exists($config_phar)) {
            throw new \Exception('Phar.json not found.');
        }

        $json = json_decode($this->files->get($config_phar));

        $this->info('Compiling Application');
        $this->info('Name.........: ' . $json->name);
        $this->info('Title........: ' . $json->title);
        $this->info('version......: ' . $json->version);
        $this->info('---------------------------------------------');

        event()->listen('Bugotech\Phar\Events\AddFileEvent', function (AddFileEvent $event) {
            $this->info('..' . $event->getInfo());
        });

        // Compilar
        $maker = new Maker($this->files, $json->name, $json->title, $json->version, base_path());
        $maker->build();

        // Executar scripts
        $this->runScripts('phar.scripts.after-build');
    }
1120339
public function handle()
    {
        $name = $this->argument('name');

        $error = $this->validateName($name);

        if ($error) {
            $this->error($error);
            return;
        }

        $key = ApiKey::where('name', $name)->first();

        if ($key->active) {
            $this->info('Key "' . $name . '" is already active');
            return;
        }

        $key->active = 1;
        $key->save();

        $this->info('Activated key: ' . $name);
    }
739907
public function handle()
    {
        $this->profile = $this->argument('profile');

        // check valid profile
        if (!Config::get('ntrust.profiles.' . $this->profile))
        {
            $this->error('Invalid profile. Please check profiles in config/ntrust.php');
            return;
        }

        $this->line(substr(__DIR__, 0, -8).'views');

        $this->laravel->view->addNamespace('ntrust', substr(__DIR__, 0, -15).'views');

        $rolesTable          = Config::get('ntrust.profiles.'. $this->profile .'.roles_table');
        $roleUserTable       = Config::get('ntrust.profiles.'. $this->profile .'.role_user_table');
        $permissionsTable    = Config::get('ntrust.profiles.'. $this->profile .'.permissions_table');
        $permissionRoleTable = Config::get('ntrust.profiles.'. $this->profile .'.permission_role_table');

        $this->line('');
        $this->info( "Tables: $rolesTable, $roleUserTable, $permissionsTable, $permissionRoleTable" );

        $message = "A migration that creates '$rolesTable', '$roleUserTable', '$permissionsTable', '$permissionRoleTable'".
            " tables will be created in database/migrations directory";

        $this->comment($message);
        $this->line('');

        if ($this->confirm("Proceed with the migration creation? [Yes|no]", "Yes")) {

            $this->line('');

            $this->info("Creating migration...");
            if ($this->createMigration($rolesTable, $roleUserTable, $permissionsTable, $permissionRoleTable)) {

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

            $this->line('');

        }
    }
567054
public function handle()
    {
        $packageName = $this->argument('name');

        if (!$this->templateStorageEngine->packageExists($packageName)) {
            if (!$this->confirm("The package {$packageName} is not currently installed. Would you like to install it instead? [yes|no]",
                false)
            ) {
                $this->comment("The package {$packageName} is not currently installed, and will not be installed right now.");

                return;
            } else {
                $this->comment("Okay, we will install the {$packageName} package template. Give us a moment to get things ready...");
                $this->call('template:install', ['name' => $packageName]);

                return;
            }
        }


        $this->line("Updating {$packageName}. Sit back and relax for a minute, this can take a while (it usually takes a little longer than an install).");
        $this->templateStorageEngine->updatePackage($packageName);
        $this->info("{$packageName} updated.");
    }
757931
public function handle()
    {
        $name = $this->argument('module');

        if ($name) {
            $this->updateModule($name);

            return;
        }

        /** @var \Nwidart\Modules\Module $module */
        foreach ($this->laravel['modules']->getOrdered() as $module) {
            $this->updateModule($module->getName());
        }
    }
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);
    }
457107
public function handle()
    {
        try{
            $dbname = $this->argument('dbname');
            $connection = $this->hasArgument('connection') && $this->argument('connection') ? $this->argument('connection') : config('database.default');

            $hasDb = \DB::connection($connection)->select("SELECT SCHEMA_NAME FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME = "."'".$dbname."'");

            if(empty($hasDb)) {
                \DB::connection($connection)->select('CREATE DATABASE '. $dbname);
                $this->info("Database '$dbname' created for '$connection' connection");
            }else {
                $this->info("Database $dbname already exists for $connection connection");
            }
        }catch (\Exception $e) {
            $this->error($e->getMessage());
        }
    }
727286
public function handle()
    {
        $table = trim($this->input->getArgument('table_name'));
        $name = "create_{$table}_table";

        $this->writeMigration($name, $table);

        $this->composer->dumpAutoloads();
    }
838478
public function handle()
    {

        // $this->info($this->option('language'));

        $locales = Config::get('app.locales');

        if($this->option('file') != null)
        {
            $file = base_path('resources/lang/en/'.$this->option('file'));

            foreach ($locales as $localeKey => $value) 
            {
                if($localeKey != 'en')
                {
                   $this->translate($localeKey,$file);
                }
            }   
        }
        else
        {
            $files = File::allFiles(base_path('resources/lang/en'));
            foreach ($files as $file)
            {   
                if($this->option('language') != null)
                {
                    $this->translate($this->option('language'),$file);
                }
                else
                {
                    foreach ($locales as $localeKey => $value) 
                    {
                        if($localeKey != 'en')
                        {
                           $this->translate($localeKey,$file);
                        }
                    
                    }    
                }
            }
        }
        
    }