Executes the console command.

@return mixed
508295
public function handle()
    {
        $input = $this->getCommandInput();
        $file = $this->getFilename($input->file);

        if ($this->isFileExists($file) && !$this->option('force')) {
            $this->error('The resource-file already exists! To override the existing file, use --force option to append.');

            return false;
        }

        if (empty($input->fieldNames) && empty($input->relations) && empty($input->indexes)) {
            $this->noResourcesProvided();

            return false;
        }

        if (Config::autoManageResourceMapper()) {
            $mapper = new ResourceMapper($this);
            $mapper->append($input->modelName, $input->file);
        }

        $fields = FieldTransformer::fromString($this->option('fields'), 'generic', $input->translationFor);
        $relations = $this->getRelations($input->relations);
        $indexes = $this->getIndexes($input->indexes);

        $resource = new Resource($fields, $relations, $indexes);
		

        $this->createFile($file, Helpers::prettifyJson($resource->toArray()))
            ->info('The "' . basename($file) . '" file was crafted successfully!');
    }
532797
public function handle()
    {
        $filePaths = $this->helper->getConfigFilesSorted();

        $seeds = [];

        foreach ($filePaths as $filePath) {
            $file = json_decode(file_get_contents($filePath), true);

            if (isset($file['seeder'])) {
                $seeds[] = $file['seeder'];
            }
        }

        foreach ($seeds as $class) {
            if (class_exists($class)) {
                if (app()->environment() == 'production') {
                    $this->call('db:seed', ['--class' => $class, '--force' => true]);
                } else {
                    $this->call('db:seed', ['--class' => $class]);
                }
            }
        }

        if (app()->environment() == 'production') {
            $this->call('db:seed', ['--force' => true]);
        } else {
            $this->call('db:seed');
        }
    }
522695
public function handle()
    {
        $package = $this->input->getArgument('package');

        $proceed = $this->confirmToProceed('Config Already Published!', function() use ($package)
        {
            return $this->publisher->alreadyPublished($package);
        });

        if (! $proceed) return;

        $this->publisher->publishPackage($package);

        $this->output->writeln('<info>Configuration published for package:</info> '.$package);
    }
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);
    }
1354288
public function handle()
    {
        $group = $this->input->getArgument('group');

        if (is_null($group)) {
            return $this->publish();
        }

        $groups = explode(',', $group);

        foreach($groups as $group) {
            $this->publish($group);
        }
    }
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));
    }
178289
public function handle()
    {
        //change connection if provide
        if ($this->option('c')) {
            $this->schema->setConnection($this->option('c'));
            $this->schema->switchWrapper();
            if ($this->schema->connection !== 'mysql') {
                $this->warn('Monitoring in currently supporting for mysql and updating.');
                return false;
            }
        }
        $timeInterval = 2;
        if (null !== $this->option('i') & is_integer($this->option('i'))) {
            $timeInterval = $this->option('i');
        }
        for ($i = 1; ; $i++) {
            $this->info("Fetching ($i):");
            $this->table($this->headers, $this->schema->databaseWrapper->showDatabaseStatus($timeInterval));
            $this->line('');
        }
    }
245499
public function handle()
    {
        $this->install();

        $command = trim($this->option('command'));
        if (empty($command) === true) {
            $command = 'help';
        }

        $input = new StringInput($command);
        $output = $this->getOutput();
        $application = new \Composer\Console\Application();
        $application->setAutoExit(false);
        $application->run($input, $output);
    }
510608
public function handle()
    {
        $generator = FileGenerator::make($this->getRootDirectory(), $this->getStubDirectory());

        if ($this->generate($generator) === false) {
            return false;
        }

        $this->info($this->type.' created successfully.');
    }
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;
        }
    }
585530
public function handle()
    {
        $debug = !config('loggin.debug');

        $log = config('loggin.log');
        //
        $script = Loggin::set($debug, $log);

        $this->show(file_put_contents(root().'config/loggin.php', $script, 0), $debug);

        return true;
    }
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;
    }
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');
    }
1355624
public function handle()
    {

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

        $this->modelPath = $this->formatModelPath($this->argument('ParentName'));

        $this->childName = $this->formatModel($this->argument('ChildName'));

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

        $this->setRelationshipPath();

        if ( $this->extractMethodsFromFiles() ) {

            $this->sendParentSuccessMessage();



        } else {

            $this->error('Oops, something went wrong!');

        }


        $this->clearFilePaths();

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

        $this->modelPath = $this->formatModelPath($this->argument('ChildName'));

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

        $this->setCrudPaths();

        if ( $this->deleteFiles() ) {

            $this->sendChildSuccessMessage();


        } else {

            $this->error('Oops, something went wrong!');

        }

        $this->clearFilePaths();


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

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

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

        $this->setViewPaths();

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

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

            return $this->sendChildViewsSuccessMessage();

        }

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


    }
394990
public function handle()
    {
        $countries = [];

        $data = $this->loader->load('en');
        foreach ($data as $key => $name) {
            $countries[] = [
                'name' => $name,
                'code' => "${key}",
            ];
        }

        $countries = Collection::make($countries);

        $hash = md5($countries->toJson());

        if (!$this->option('force') && $hash === $this->hash) {
            $this->line("No new country.");
            return false;
        }

        $countryCodes = $countries->pluck('code')->unique();

        $existingCountryIDs = Collection::make(
            DB::table($this->countries)->whereIn('code', $countryCodes)->pluck('id', 'code')
        );

        $countries = $countries->map(function ($item) use ($existingCountryIDs) {
            if ($existingCountryIDs->has($item['code'])) {
                $item['id'] = $existingCountryIDs->get($item['code']);
            }

            return $item;
        });

        $countries = $countries->groupBy(function ($item) {
            return array_has($item, 'id') ? 'update' : 'create';
        });

        DB::transaction(function () use ($countries, $hash) {
            $create = $countries->get('create', Collection::make());
            $update = $countries->get('update', Collection::make());

            foreach ($create->chunk(static::QUERY_LIMIT) as $entries) {
                DB::table($this->countries)->insert($entries->toArray());
            }

            foreach ($update as $entries) {
                DB::table($this->countries)->where('id', $entries['id'])->update($entries);
            }
            $this->line("{$create->count()} countries created. {$update->count()} countries updated.");
            $this->files->put(storage_path(static::INSTALL_HISTORY), $hash);
        });

        return true;
    }
219386
public function handle()
    {
        $package = $this->input->getArgument('package');

        $proceed = $this->confirmToProceed('Config Already Published!', function () use ($package) {
            return $this->config->alreadyPublished($package);
        });

        if (! $proceed) {
            return;
        }

        if (! is_null($path = $this->getPath())) {
            $this->config->publish($package, $path);
        } else {
            $this->config->publishPackage($package);
        }

        $this->output->writeln('<info>Configuration published for package:</info> '.$package);
    }
191560
public function handle()
    {
        // Get Settings
        $defaultCurrency = $this->currency->config('default');

        if ($this->input->getOption('google')) {
            // Get rates from google
            return $this->updateFromGoogle($defaultCurrency);
        }

        if ($this->input->getOption('openexchangerates')) {
            if (!$api = $this->currency->config('api_key')) {
                $this->error('An API key is needed from OpenExchangeRates.org to continue.');

                return;
            }

            // Get rates from OpenExchangeRates
            return $this->updateFromOpenExchangeRates($defaultCurrency, $api);
        }
    }