Loading and publishing package's views

@return void
165307
protected function viewHandle()
    {
        $packageViewsPath = __DIR__.'/resources/views';

        $this->loadViewsFrom($packageViewsPath, 'workflow');

        $this->publishes([
            $packageViewsPath => resource_path('views/'),
        ], 'workflow_views');
    }
1319165
protected function dumpViews()
    {
        $this->tables->execute();

        foreach ($this->tables->fetchAll(\PDO::FETCH_ASSOC) as $a) {
            $view = current($a);

            if (!isset($a['Table_type']) || $a['Table_type'] !== 'VIEW') {
                continue;
            }

            if (in_array($view, (array) $this->config->ignore, true)) {
                continue;
            }

            if ((string) $this->config->prefix !== '' && strpos($view, $this->config->prefix) !== 0) {
                continue;
            }

            $structure = $this->pdo->query('SHOW CREATE VIEW `'.$view.'`');

            if ($structure = $structure->fetch(\PDO::FETCH_ASSOC)) {
                if (isset($structure['Create View'])) {
                    $this->write("\n-- Structure for view `{$view}`\n", false);
                    $this->write('DROP VIEW IF EXISTS `'.$view.'`');
                    $this->write($structure['Create View']);
                }
            }
        }
    }
1271578
protected function exportViews()
    {
        foreach ($this->views as $key => $value) {
            $path = base_path('resources/views/'.$value);

            $this->line('<info>Created View:</info> '.$path);

            copy(__DIR__.'/stubs/make/views/'.$key, $path);
        }
    }
1115909
public function boot() {
    $this->publishConfig();
    $this->publishMigration();
    $this->publishAssets();
    $this->loadViewsFrom(__DIR__ . '/views', 'taxonomy');
    $this->loadTranslationsFrom(__DIR__ . '/lang', 'taxonomy');
  }
27772
public function load() {
		session_start();

		$this->loadSiteClass();
		$this->checkRedirect();
		$this->applyViewRenderer();

		$this->loadController();
		$this->render();

	}
894415
protected function installPackage()
    {
        if ($this->confirm('Do you want publish the pingpong/admin\'s migrations ?')) {
            $this->call('admin:migration');
        }

        if ($this->confirm('Do you want publish the pingpong/trusty\'s migrations ?')) {
            $this->call('vendor:publish', [
                '--provider' => 'Pingpong\Trusty\TrustyServiceProvider',
            ]);
        }

        if ($this->confirm('Do you want run all migrations now ?')) {
            $this->call('migrate');
        }

        if ($this->confirm('Do you want run the pingpong/admin\'s seeders now ?')) {
            $this->call('admin:seed');
        }

        if ($this->confirm('Do you want publish configuration files from pingpong/admin package ?')) {
            $this->call('vendor:publish', [
                '--provider' => 'Pingpong\Admin\AdminServiceProvider',
                ['--tag' => ['config']],
            ]);
        }

        if ($this->confirm('Do you want publish assets from pingpong/admin package ?')) {
            $this->call('vendor:publish', [
                '--provider' => 'Pingpong\Admin\AdminServiceProvider',
                ['--tag' => ['assets']],
            ]);
        }

        if ($this->confirm('Do you want create the app/menus.php file ?')) {
            $this->installMenus();
        }

        $this->call('optimize');
    }
910608
public function boot()
    {
    	if (config('smsir.panel-routes', true)) {
            // the main router
            include_once __DIR__.'/routes.php';
        }
	    // the main views folder
	    $this->loadViewsFrom(__DIR__.'/views', 'smsir');
	    // the main migration folder for create smsir tables

	    // for publish the views into main app
	    $this->publishes([
		    __DIR__.'/views' => resource_path('views/vendor/smsir'),
	    ]);

	    $this->publishes([
		    __DIR__.'/migrations/' => database_path('migrations')
	    ], 'migrations');

	    // for publish the assets files into main app
	    $this->publishes([
		    __DIR__.'/assets' => public_path('vendor/smsir'),
	    ], 'public');

	    // for publish the smsir config file to the main app config folder
	    $this->publishes([
		    __DIR__.'/config/smsir.php' => config_path('smsir.php'),
	    ]);
    }
32111
private function makeViews()
    {

        foreach ($this->views as $view) {
            // index, create, show, edit
            new MakeView($this, $this->files, $view);
        }


        $this->info('Views created successfully.');

        $this->info('Dump-autoload...');
        $this->composer->dumpAutoloads();

        $this->info('Route::resource("'.$this->getObjName("names").'","Admin\\'.$this->getObjName("Name").'Controller"); // Add this line in routes.php');

    }
30926
protected function load()
    {
        $tables = $this->fetchTables($this->schema);
        foreach ($tables as $table) {
            $this->loadTable($table);
        }
        $views = $this->fetchViews($this->schema);
        foreach ($views as $table) {
            $this->loadTable($table, true);
        }
    }
75135
protected function registerPublishes(): void
    {
        $this->publishes([
            $this->packagePath('config') => config_path('/'),
        ], 'config');

        $this->publishes([
            $this->homeDirectory . '/../resources/lang' => base_path('resources/lang/vendor/' . $this->packageName),
        ], 'language');
    }
931115
public function boot() {
		$this->loadViewsFrom(__DIR__ . '/../../assets/views', 'notify');

		$this->publishes([
			__DIR__ . '/../../config' => base_path('config')
		], 'config');

		$this->publishes([
			__DIR__ . '/../../assets/less' => base_path('resources/assets/vendor/marwelln/notifier')
		], 'less');

		// Send notifier variable to given views.
		view()->composer(config('marwelln.notifier.notifierViews', ['layout.default']), function($view) {
			$view->with('notifier', new Notify(Session::get('notifier', [])));
		});
	}
286828
protected function setupPackage()
    {
        $configuration = realpath(__DIR__.'/../config/credentials.php');
        $migrations = realpath(__DIR__.'/../migrations');

        $this->publishes([
            $configuration => config_path('credentials.php'),
            $migrations    => base_path('database/migrations'),
        ]);

        $this->mergeConfigFrom($configuration, 'credentials');

        $this->loadViewsFrom(realpath(__DIR__.'/../views'), 'credentials');
    }
108389
private function loadViews() {
        if($this->views) {
            return;
        }

        //scan views - and store result in cache
        $cache = $this->getLoops()->getService("cache");
        $key = "Loops-Renderer-".implode("-", $this->view_dir);
        if($cache->contains($key)) {
            $this->views = $cache->fetch($key);
        }
        else {
            foreach($this->view_dir as $view_dir) {
                $this->scanViewDir($view_dir);
            }
            $cache->save($key, $this->views);
        }
    }
237988
protected function exportViews()
    {
        foreach ($this->views as $key => $value) {
            copy(
                __DIR__.'/stubs/make/views/'.$key,
                resource_path('views/'.$value)
            );
        }
    }
749166
protected function loadViews()
    {
        if (is_dir($appPath = $this->publishViewPath())) {
            view()->addNamespace($this->getKey(), $appPath);
        }

        view()->addNamespace($this->getKey(), $this->getViewsPath());
    }
1194539
public function registerViews(): self
    {
        $this->loadViewsFrom(PLATFORM_PATH.'/resources/views', 'platform');

        $this->publishes([
            PLATFORM_PATH.'/resources/views' => resource_path('views/vendor/platform'),
        ], 'views');

        return $this;
    }
1365920
private function publishFiles()
    {
        $publishTag = $this->_packageTag;

        $this->publishes([
            __DIR__.'/../config/roles.php' => config_path('roles.php'),
        ], $publishTag.'-config');

        $this->publishes([
            __DIR__.'/Database/Migrations' => database_path('migrations'),
        ], $publishTag.'-migrations');

        $this->publishes([
            __DIR__.'/Database/Seeds/publish' => database_path('seeds'),
        ], $publishTag.'-seeds');

        $this->publishes([
            __DIR__.'/../config/roles.php'    => config_path('roles.php'),
            __DIR__.'/Database/Migrations'    => database_path('migrations'),
            __DIR__.'/Database/Seeds/publish' => database_path('seeds'),
        ], $publishTag);
    }