Execute the command.

@return void
176862
public function fire()
	{
		//gather information
		$name = studly_case($this->argument('name'));
		
		$is_neonbug_package = 
			($this->choice('What type of package is this? Enter 0 or 1 [0]', ['app', 'neonbug'], '0') == 'neonbug');
		
		$neonbug_packages_path = $this->neonbug_packages_path;
		$packages_path         = ($is_neonbug_package ? $this->neonbug_packages_path : $this->app_packages_path);
		$namespace             = ($is_neonbug_package ? 'Neonbug' : 'App\\Packages');
		$config_root           = ($is_neonbug_package ? 'neonbug' : 'packages');
		
		$package_path          = $packages_path . $name . '/';
		$neonbug_package_path  = $neonbug_packages_path . $name . '/';
		if (file_exists($package_path) || file_exists($neonbug_package_path)) exit('Package already exists');
		
		$snake_package_name = snake_case($name);
		$lowercase_snake_package_name = mb_strtolower($snake_package_name);
		
		$table_name    = $this->ask('Table name: [' .   $snake_package_name . ']', $snake_package_name);
		$route_prefix  = $this->ask('Route prefix: [' . $snake_package_name . ']', $snake_package_name);
		$config_prefix = $this->ask('Config name: [' .  $snake_package_name . ']', $snake_package_name);
		
		$model_name = studly_case($table_name);
		
		//check with user if this is it
		$this->info('About to create a package:');
		$this->table([ 'Key', 'Value' ], [
			[ 'Package name',            $name ], 
			[ 'Table name',        $table_name ], 
			[ 'Route prefix',    $route_prefix ], 
			[ 'Config name',    $config_prefix ], 
			[ 'Model name',        $model_name ]
		]);
		if (!$this->confirm('Is this information correct, do you wish to continue (y/n)? [y]', true)) return;
		
		mkdir($package_path, 0755, true);
		
		//generate templates
		$template_path = __DIR__ . '/CreatePackage/';
		
		$create_table_migration_name = date('Y_m_d') . '_000100_create_' . $lowercase_snake_package_name . '_table.php';
		$insert_trans_migration_name = date('Y_m_d') . '_000101_insert_' . $lowercase_snake_package_name . '_translations.php';
		$trans_dir                   = 'database/migrations/translations.' . $lowercase_snake_package_name . '/';
		
		$templates = [
			'_create_table'        => [ 'dir' => 'database/migrations/', 'file'         => $create_table_migration_name ], 
			'_insert_translations' => [ 'dir' => 'database/migrations/', 'file'         => $insert_trans_migration_name ], 
			'_Controller'          => [ 'dir' => 'Controllers/',         'file'                     => 'Controller.php' ], 
			'_AdminController'     => [ 'dir' => 'Controllers/',         'file'                => 'AdminController.php' ], 
			'_Model'               => [ 'dir' => 'Models/',              'file'                 => $model_name . '.php' ], 
			'_ServiceProvider'     => [ 'dir' => 'Providers/',           'file'                => 'ServiceProvider.php' ], 
			'_config'              => [ 'dir' => 'config/',              'file'              => $config_prefix . '.php' ], 
			'_ModelRepository'     => [ 'dir' => 'Repositories/',        'file'       => $model_name . 'Repository.php' ], 
			'_trans_admin'         => [ 'dir' => $trans_dir,             'file'                          => 'admin.php' ], 
			'_trans_frontend'      => [ 'dir' => $trans_dir,             'file'                       => 'frontend.php' ], 
			'_index'               => [ 'dir' => 'resources/views/',     'file' => 'index.blade.php', 'prefix' => false ], 
			'_item'                => [ 'dir' => 'resources/views/',     'file'  => 'item.blade.php', 'prefix' => false ], 
		];
		
		foreach ($templates as $template_source=>$template_destination)
		{
			$filename = $template_path . $template_source . '.php';
			if (!file_exists($filename))
			{
				$filename = $template_path . $template_source . '.blade.php';
			}
			if (!file_exists($filename)) continue;
			
			$contents = $this->view_factory->file($filename)
				->with('namespace', 				$namespace)
				->with('package_name', 				$name)
				->with('lowercase_package_name', 	$lowercase_snake_package_name)
				->with('table_name', 				$table_name)
				->with('model_name', 				$model_name)
				->with('route_prefix', 				$route_prefix)
				->with('config_root', 				$config_root)
				->with('config_prefix', 			$config_prefix)
				->render();
			
			if (!array_key_exists('prefix', $template_destination) || $template_destination['prefix'] == true)
			{
				$contents = '<?php ' . $contents;
			}
			
			if (!file_exists($package_path . $template_destination['dir']))
			{
				mkdir($package_path . $template_destination['dir'], 0755, true);
			}
			file_put_contents($package_path . $template_destination['dir'] . $template_destination['file'], $contents);
		}
		
		//inform user we're done
		$step_idx = 1;
		
		$this->info('Done!');
		$this->line('You should now:');
		$this->line(($step_idx++) . ') add table columns in file ' . 
			realpath($packages_path . $name . '/database/migrations/' . $create_table_migration_name) . ', ');
		$this->line(($step_idx++) . ') add some fields in file ' . 
			realpath($packages_path . $name . '/config/' . $config_prefix . '.php') . ', ');
		$this->line(($step_idx++) . ') add translations in files ' . 
			realpath($packages_path . $name . '/' . $trans_dir . 'admin.php') . ' and ' . 
			realpath($packages_path . $name . '/' . $trans_dir . 'frontend.php') . ', ');
		$this->line(($step_idx++) . ') add ' . $namespace . '\\' . $name . '\Providers\ServiceProvider to ' . 
			'$package_providers array in file /config/app.php, ');
		
		if ($is_neonbug_package)
		{
			$this->line(($step_idx++) . ') add "autoload": ' . 
				'{ "psr-4": { "' . $namespace . '\\\\' . $name . '\\\\": "neonbug/' . $name . '" } } to composer.json, ');
			$this->line(($step_idx++) . ') run composer dump-autoload, ');
		}
		
		$this->line(($step_idx++) . ') run php artisan vendor:publish and php artisan migrate.');
	}
1188441
public function handle()
    {
        $id = $this->argument('id');

        if ($id === null) {
            $this->table(
                ['ID', 'Email'],
                User::all(['id', 'email'])->toArray()
            );
            $id = $this->ask('ID?');
        }

        User::where('id', $id)->update([
            'password' => bcrypt($this->secret('New password?'))
        ]);

        $this->info('User was updated');
    }
630812
public function handle()
    {
        try {
            $role = App::make(config('commands.role'));

            $role::create([
                'name' => $this->ask('Name?')
            ]);
            $this->info('Role created');
        } catch (\Exception $exception) {
            $this->error($exception->getMessage());
        }
    }
1260031
public function handle()
    {
        parent::handle();

        $modelGenerator = new ModelGenerator($this->commandData);
        $modelGenerator->generate();

        $this->performPostActions();
    }
53484
public function handle()
    {
        if ($package = $this->option('package')) {
            $this->manager->setPathToVendorPackage($package);
        }

        $this->files = $this->manager->files();

        if (empty($this->files)) {
            $this->warn('No language files were found!');
        }

        $languages = $this->manager->languages();

        $this->table(
            array_merge(['key'], $languages),
            $this->tableRows()
        );
    }
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('');
    }
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');
    }
224900
public function handle()
    {
        $requestLogger = app(ResponseLogger::class);
        $requestLogger->log($this->request, $this->response);
    }
1008835
public function handle()
    {
        if (is_null($this->argument('name'))) {
            $this->installFromFile();

            return;
        }

        $this->install(
            $this->argument('name'),
            $this->argument('version'),
            $this->option('type'),
            $this->option('tree')
        );
    }
656622
public function handle()
    {
        foreach ($this->schedule->dueEvents($this->laravel) as $event) {
            if (! $event->filtersPass($this->laravel)) {
                continue;
            }

            if ($event->onOneServer) {
                $this->runSingleServerEvent($event);
            } else {
                $this->runEvent($event);
            }

            $this->eventsRan = true;
        }

        if (! $this->eventsRan) {
            $this->info('No scheduled commands are ready to run.');
        }
    }
1002248
public function fire()
    {
        $this->info('CheeModule Commands:');
        $this->info('-------------------------------------------------------------------------------------------------------------------------------');
        $this->info('| CheeModule:create         | Create a new module for development | eg: php artisan CheeModule:create name=moduleName         |');
        $this->info('-------------------------------------------------------------------------------------------------------------------------------');
        $this->info('| CheeModule:buildAssets    | Move assets directory to public     | eg: php artisan CheeModule:buildAssets name=moduleName    |');
        $this->info('-------------------------------------------------------------------------------------------------------------------------------');
        $this->info('| CheeModule:installEvent   | Run install event for a module      | eg: php artisan CheeModule:installEvent name=moduleName   |');
        $this->info('-------------------------------------------------------------------------------------------------------------------------------');
        $this->info('| CheeModule:uninstallEvent | Run uninstall event for a module    | eg: php artisan CheeModule:uninstallEvent name=moduleName |');
        $this->info('-----------------------------------------------------------------------------------------------------------------------------');
        $this->info('');
    }
610196
public function handle()
    {

        $this->folderName = $this->formatModelPath($this->argument('ModelName'));

        $this->modelName = $this->formatModel($this->argument('ModelName'));

        $this->setCommandType($this->argument('command'));

        $this->setViewPaths();


        $path = base_path('resources/views/'. $this->folderName);

        if ( $this->removeViewFolder($path) && $this->deleteFiles() ) {

            $this->sendSuccessMessage();

            return;

        }

        $this->error('No Such Directory');


    }
159578
public function handle()
    {
        $name = $this->argument('name');
        $readableName = $this->argument('readableName');
        $userId = $this->option('user');
        $roleName = $this->option('role');

        $permission = $this->createPermission($name, $readableName);

        if ($userId) {
            $this->attachPermissionToUser($permission, $userId);
        }

        if ($roleName) {
            $this->attachPermissionToRole($permission, $roleName);
        }
    }
737945
public function handle()
    {

        // Ask what command
        $command = $this->choice('What command are you running?', $this->availableCommands->toArray());

        if (!$this->availableCommands->has($command)) {
            $this->info('The specified command does not exist.');
            return;
        }

        $method = 'make' . ucfirst($command);
        call_user_func([$this, $method]);

        $this->call('make:'. $command, $this->options);
    }
1274894
public function handle()
    {
        $this->abortCommandExecution();
        $file = $this->argument('file');
        $this->runScp(base_path($file), $this->domain, null, true);
    }
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());
        }
    }
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);
    }