Execute the console command.

@param \Illuminate\Filesystem\Filesystem $filesystem

@return void
175426
public function handle(Filesystem $filesystem)
    {
        $this->info('Publishing the Admin assets, database, language, and config files');
        $this->call('vendor:publish', ['--provider' => AdminServiceProvider::class]);
        $this->call('vendor:publish', ['--provider' => ImageServiceProviderLaravel5::class]);

        $this->info('Migrating the database tables into your application');
        $this->call('migrate');

        $this->info('Attempting to set Admin User model as parent to App\User');
        if (file_exists(app_path('User.php'))) {
            $str = file_get_contents(app_path('User.php'));

            if ($str !== false) {
                $str = str_replace('extends Authenticatable', "extends \LaravelAdminPanel\Models\User", $str);

                file_put_contents(app_path('User.php'), $str);
            }
        } else {
            $this->warn('Unable to locate "app/User.php".  Did you move this file?');
            $this->warn('You will need to update this manually.  Change "extends Authenticatable" to "extends \LaravelAdminPanel\Models\User" in your User model');
        }

        $this->info('Dumping the autoloaded files and reloading all new files');

        $composer = $this->findComposer();

        $process = new Process($composer.' dump-autoload');
        $process->setWorkingDirectory(base_path())->run();

        $this->info('Adding Admin routes to routes/web.php');
        $routes_contents = $filesystem->get(base_path('routes/web.php'));
        if (false === strpos($routes_contents, 'Admin::routes()')) {
            $filesystem->append(
                base_path('routes/web.php'),
                "\n\nRoute::group(['prefix' => 'admin'], function () {\n    Admin::routes();\n});\n"
            );
        }

        \Route::group(['prefix' => 'admin'], function () {
            \Admin::routes();
        });

        $this->info('Seeding data into the database');
        $this->seed('AdminDatabaseSeeder');

        if ($this->option('with-dummy')) {
            $this->seed('AdminDummyDatabaseSeeder');
        }

        $this->info('Adding the storage symlink to your public folder');
        $this->call('storage:link');

        $this->info('Successfully installed Admin! Enjoy');
    }
1274392
public function fire(Application $app, Filesystem $files)
    {
        $this->files = $files;

        /** @var ModuleContainer[] $modules */
        $modules = $app['modules.loader']->getRegisteredModules();

        foreach ($modules as $module) {
            $from = $module->getAssetsPath();
            if ($this->files->isDirectory($from)) {
                $this->publishDirectory($from, $module->getAssetsPublicPath());
            }
        }
    }
437983
public function handle()
    {
        $this->module = $this->laravel['modules'];

        $name = $this->argument('module');

        if (!empty($name)) {
            $this->reset($name);

            return;
        }

        foreach ($this->module->getOrdered($this->option('direction')) as $module) {
            $this->line('Running for module: <info>' . $module->getName() . '</info>');

            $this->reset($module);
        }
    }
491644
public function handle()
    {
        $updates = new Updates();
        $updates->updateInstall();

        $this->progressBar = $this->output->createProgressBar(6);

        $this->info("
        ________________________________________________________________
               ____    _____     _____   _    _   _____   _____
              / __ \  |  __ \   / ____| | |  | | |_   _| |  __ \
             | |  | | | |__) | | |      | |__| |   | |   | |  | |
             | |  | | |  _  /  | |      |  __  |   | |   | |  | |
             | |__| | | | \ \  | |____  | |  | |  _| |_  | |__| |
              \____/  |_|  \_\  \_____| |_|  |_| |_____| |_____/
                             
                             Installation started. Please wait...
                             Version: $updates->currentVersion
        ________________________________________________________________
        ");

        sleep(1);

        $this
            ->checkInstall()
            ->executeCommand('migrate')
            ->executeCommand('vendor:publish',
                [
                    '--force' => true,
                    '--tag'   => 'migrations',
                ])
            ->executeCommand('vendor:publish', [
                '--provider' => FoundationServiceProvider::class,
                '--force'    => true,
                '--tag'      => [
                    'config',
                    'migrations',
                    'orchid-stubs',
                ], ])
            ->executeCommand('vendor:publish', [
                '--provider' => PressServiceProvider::class,
                '--force'    => true,
                '--tag'      => [
                    'config',
                    'migrations',
                ], ])
            ->executeCommand('migrate')
            ->executeCommand('storage:link');

        $this->changeUserModel();
        $this->progressBar->finish();
        $this->info(' Completed!');

        $this
            ->setValueEnv('SCOUT_DRIVER')
            ->comment("To create a user, run 'artisan orchid:admin'");

        $this->line("To start the embedded server, run 'artisan serve'");

        event(new InstallEvent($this));
    }
1302284
public function handle()
    {
        $this->makeDir('Settings');

        $this->makeDir('Settings/Resources');

        $namespace = NameResolver::getAppNamespace().'Settings\\Resources';

        $this->writeRulesFile($namespace);

        $this->info('Rules file successfully 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('');
    }
396343
public function handle()
    {
        if ( $this->config['cleanup']['enabled'] != true )
        {
            $this->error( 'ITB:backup-cleanup IS DISABLED VIA CONFIGURATION' );
            die;
        }
        $this->info( '' );
        $this->info( 'Removing all stored backups...' );
        $this->registerClassAutoloadExceptions();

        $this->timer = microtime(true);

        if ( strtolower( $this->ask( 'DO YOU REALLY WANT TO REMOVE ALL BACKUPS? [type `confirm` to perform cleanup]' ) ) == 'confirm' )
        {
            if( is_dir( $this->config[ 'backupDir' ] ) )
            {
                $this->_rrmdir( $this->config[ 'backupDir' ] );
            }
            else
            {
                $this->error( 'Nothing to remove.' );
            }
        }
        else
        {
            $this->error( 'Cancelled.' );
        }
        $this->info( '' );
        $time = microtime(true)-$this->timer;
        $this->info( 'Done in ' . number_format( $time, 2, ',', ' ' ) . ' seconds.' );
        $this->info( '' );
    }
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()
        );
    }
1124297
public function handle()
    {
        $name = $this->argument('name');
        //
        $process = Events::create($name);
        //
        $this->show($process, $name);
    }
1217522
public function handle()
    {
        $cachedViews = storage_path('framework/views/');
        $files = glob($cachedViews.'*');
        foreach($files as $file) {
            if(is_file($file)) {
                @unlink($file);
                $this->info("File $file deleted!");
            }
        }
    }
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());
        }
    }
460577
public function handle()
    {
        $action = $this->getActionArgument(['add', 'update', 'delete']);

        foreach ($this->getCurrencyArgument() as $currency) {
            $this->$action(strtoupper($currency));
        }
    }
635419
public function handle()
    {
        if ($this->shouldBeFailed()) {
            return;
        }

        $database = $this->config['database'] ?? null;
        $migrator = $this->resolveMigrator();

        if (! $this->shouldBeDelayed()) {
            $migrator->runReset($this->model, $database);

            $this->delete();
        }
    }
1049415
public function handle(): void
    {
        $folders = [
            'widgets',
        ];

        foreach ($folders as $folder) {
            if (config('filesystems.disks.'.$folder)) {
                $path = config('filesystems.disks.'.$folder.'.root');
                $this->createDir($path);
            }
        }
    }
878337
public function handle()
    {

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


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

        if ( $this->removeViewFiles($path) ) {

            $this->sendViewSuccessMessage();


        } else {

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

        }

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

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

        $this->setPaths();

        if ( $this->deleteCrudFiles() ) {

            $this->sendSuccessMessage();

            return;

        }

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




    }
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);
    }
220262
public function fire(Filesystem $filesystem)
    {
        $this->info('Publishing the Voyager assets, database, and config files');
        $this->call('vendor:publish', ['--provider' => VoyagerServiceProvider::class]);
        $this->call('vendor:publish', ['--provider' => ImageServiceProviderLaravel5::class]);

        $this->info('Migrating the database tables into your application');
        $this->call('migrate');

        $this->info('Dumping the autoloaded files and reloading all new files');

        $composer = $this->findComposer();

        $process = new Process($composer.' dump-autoload');
        $process->setWorkingDirectory(base_path())->run();

        $this->info('Adding Voyager routes to routes/web.php');
        $filesystem->append(
            base_path('routes/web.php'),
            "\n\nRoute::group(['prefix' => 'admin'], function () {\n    Voyager::routes();\n});\n"
        );

        $this->info('Seeding data into the database');
        $this->seed('VoyagerDatabaseSeeder');

        if ($this->option('with-dummy')) {
            //$this->seed('VoyagerDummyDatabaseSeeder');
        }

        $this->info('Adding the storage symlink to your public folder');
        $this->call('storage:link');

        $this->info('Successfully installed Voyager! Enjoy 🎉');
    }