Execute the console command.

@return mixed
766979
public function handle()
    {
        $name = $this->argument('name');
        $createMigration = $this->option('m');
        $createResourceController = $this->option('c');

        if (empty($name)) {
            return $this->error("You need to specify an object to create");
        }

        $newObject = ucfirst($name).'.php';
        $newContract = ucfirst($name).'Repository.php';
        $newConcrete = 'Eloquent'.ucfirst($name).'Repository.php';

        $this->createObjectFiles($name, $newObject, $newContract, $newConcrete);

        $this->makeBindings($newContract, $newConcrete);

        $this->makeMigration($createMigration);

        $this->makeResourceController($createResourceController);

        return $this->info('Your structure 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);
    }
378925
public function handle()
    {
        $this->tables = $this->getTablesFromMWBFile();
        if ($this->tables === false) {
            return false;
        }
        $this->getAppJson();

        $success = $this->validateTableSchema();
        if (!$success) {
            return false;
        }

        $tableName = $this->option('table');
        if (!empty($tableName)) {
            $table = $this->findTableFromName($tableName);
            if (empty($table)) {
                $this->output('Table ( '.$tableName.' ) doesn\'t exist.', 'error');

                return false;
            }
            $this->tables = [$table];
        }

        $this->databaseService = new DatabaseService($this->config, $this->files);
        $this->databaseService->resetDatabase();

        $this->generateMigration();
        $this->generateModel();

        $this->styleCode();

        $this->databaseService->dropDatabase();

        return true;
    }
1157806
public function handle()
    {
        $model = $this->argument('model');

        if ($this->manager->isModelExists($model)) {
            return $this->showDetail($this->manager->getModel($model));
        }

        $this->error("Model {$model} is not 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;
        }
    }
268098
public function handle()
    {
        if (file_exists($publicPath = public_path('assets'))) {
            return $this->error('The "webroot/assets" directory already exists.');
        }

        $assetsPath = $this->container['config']->get('routing.assets.path', base_path('assets'));

        $this->container->make('files')->link(
            $assetsPath, $publicPath
        );

        $this->info('The [webroot/assets] directory has been linked.');
    }
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);
    }
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;
    }
1045253
public function handle()
    {

        if (! $this->preflighted()) return;

        while (true) {

            $bookmarks = $this->retrieve([
                'character_id' => $this->getCharacterId(),
            ]);

            if ($bookmarks->isCachedLoad()) return;

            collect($bookmarks)->chunk(1000)->each(function ($chunk) {

                $records = $chunk->map(function ($bookmark, $key) {

                    $normalized_location = $this->find_nearest_celestial(
                        $bookmark->location_id,
                        $bookmark->position->x ?? 0.0,
                        $bookmark->position->y ?? 0.0,
                        $bookmark->position->z ?? 0.0);

                    return [
                        'character_id' => $this->getCharacterId(),
                        'bookmark_id'  => $bookmark->bookmark_id,
                        'creator_id'   => $bookmark->creator_id,
                        'folder_id'    => $bookmark->folder_id ?? null,
                        'created'      => carbon($bookmark->created),
                        'label'        => $bookmark->label,
                        'notes'        => $bookmark->notes,
                        'location_id'  => $bookmark->location_id,
                        'item_id'      => $bookmark->item->item_id ?? null,
                        'type_id'      => $bookmark->item->type_id ?? null,
                        'x'            => $bookmark->coordinates->x ?? null,
                        'y'            => $bookmark->coordinates->y ?? null,
                        'z'            => $bookmark->coordinates->z ?? null,
                        'map_id'       => $normalized_location['map_id'],
                        'map_name'     => $normalized_location['map_name'],
                        'created_at'   => carbon(),
                        'updated_at'   => carbon(),
                    ];
                });

                CharacterBookmark::upsert($records->toArray(), [
                    'character_id',
                    'bookmark_id',
                    'creator_id',
                    'folder_id',
                    'created',
                    'label',
                    'notes',
                    'location_id',
                    'item_id',
                    'type_id',
                    'x',
                    'y',
                    'z',
                    'map_id',
                    'map_name',
                    'updated_at',
                ]);
            });

            $this->known_bookmarks->push(collect($bookmarks)
                ->pluck('bookmark_id')->flatten()->all());

            if (! $this->nextPage($bookmarks->pages))
                break;
        }

        CharacterBookmark::where('character_id', $this->getCharacterId())
            ->whereNotIn('bookmark_id', $this->known_bookmarks->flatten()->all())
            ->delete();
    }
157824
public function handle()
    {
        $this->tables = $this->getTablesFromMWBFile();
        if ($this->tables === false) {
            return false;
        }
        $this->getAppJson();

        $success = $this->validateTableSchema();
        if (!$success) {
            return false;
        }

        return true;
    }
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.');
        }

    }
100217
public function handle()
    {
        // setup
        $this->setSettings();
        $this->getResourceName($this->getUrl(false));

        // check the path where to create and save file
        $path = $this->getPath('');
        if ($this->files->exists($path) && $this->optionForce() === false) {
            return $this->error($this->type . ' already exists!');
        }

        // make all the directories
        $this->makeDirectory($path);

        // build file and save it at location
        $this->files->put($path, $this->buildClass($this->argumentName()));

        // output to console
        $this->info(ucfirst($this->option('type')) . ' created successfully.');
        $this->info('- ' . $path);

        // if we need to run "composer dump-autoload"
        if ($this->settings['dump_autoload'] === true) {
            if ($this->confirm("Run 'composer dump-autoload'?")) {
                $this->composer->dumpAutoloads();
            }
        }
    }
1210741
public function handle()
    {
        $key = $this->generateRandomKey();

        if ($this->option('show')) {
            return $this->line('<comment>'.$key.'</comment>');
        }

        // Next, we will replace the application key in the environment file so it is
        // automatically setup for this developer. This key gets generated using a
        // secure random byte generator and is later base64 encoded for storage.
        if (! $this->setKeyInEnvironmentFile($key)) {
            return;
        }

        $this->laravel['config']['app.key'] = $key;

        $this->info('Application key set successfully.');
    }
218521
public function handle()
    {

        $connectionName = ! empty($this->argument('connection')) && $this->argument('connection') != 'null'
            ? $this->argument('connection') : config('database.default');
        $connection = config('database.connections.' . $connectionName);

        if (empty($connection)) {
            $this->info('No connection details');
            return false;
        }

        if ($connection['driver'] != 'mysql') {
            return $this->notMysql();
        }

        $cmd = $this->makeCommand($connection, $connectionName);

        try {
            exec($cmd);
        } catch (\Exception $e) {
            $this->info('There was an error');
            $this->info('Message: ' . $e->getMessage());
            $this->info('Trace: ' . $e->getTraceAsString());
            return false;
        }

    }
1180179
public function handle()
    {
        $repository = modules($this->option('location') ?? config('modules.default_location'));

        $slug = $this->argument('slug');

        if ($slug) {
            if (! $repository->exists($slug)) {
                return $this->error('Module does not exist.');
            }

            if ($repository->isEnabled($slug)) {
                $this->seed($slug, $repository);
            }
            elseif ($this->option('force')) {
                $this->seed($slug, $repository);
            }

            return;
        }
        else {
            if ($this->option('force')) {
                $modules = $repository->all();
            }
            else {
                $modules = $repository->enabled();
            }

            foreach ($modules as $module) {
                $this->seed($module['slug'], $repository);
            }
        }
    }
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]);
        }
    }
211839
public function handle()
	{
		$days = (int)$this->option( 'days' );

		if ( $days < 0 )
		{
			$this->writeError( "days option cannot be negative" );

			return self::ERROR;
		}

		$success = $this->manager->deleteBackupFiles( $this->lang_folder_path , $days , $this->option( 'dry-run' ) );

		return ( $success === true ) ? self::SUCCESS : self::ERROR;
	}