src/Services/PluginManager.php
private function publishViews($register)
    {
        // read views from folder
        $visitPath = $this->path . '/views';
        if (!file_exists($visitPath)) {
            return;
        }
        $files = [];
        list_files($files, $visitPath, ['php']);

        // update manifest
        $manifest = $this->getManifest('views');
        /** @noinspection PhpIncludeInspection */
        $list = file_exists($manifest) ? include $manifest : [];
        $visitPathLength = strlen($visitPath) + 1;
        $basePathLength  = strlen(base_path()) + 1;
        foreach ($files as $file) {
            if (substr($file, -10) == '.blade.php') {
                $name = $this->plugin . '.' . str_replace(DIRECTORY_SEPARATOR, '.', substr($file, $visitPathLength, -10));
                if ($register) {
                    $list[$name] = substr($file, $basePathLength);
                }
                else {
                    unset($list[$name]);
                }
            }
        }
        $this->saveArray($manifest, $list);
    }
private function publishViews($register)
    {
        // read views from folder
        $visitPath = $this->path . '/views';
        if (!file_exists($visitPath)) {
            return;
        }
        $files = [];
        list_files($files, $visitPath, ['php']);

        // update manifest
        $manifest = $this->getManifest('views');
        /** @noinspection PhpIncludeInspection */
        $list = file_exists($manifest) ? include $manifest : [];
        $visitPathLength = strlen($visitPath) + 1;
        $basePathLength  = strlen(base_path()) + 1;
        foreach ($files as $file) {
            if (substr($file, -10) == '.blade.php') {
                $name = $this->plugin . '.' . str_replace(DIRECTORY_SEPARATOR, '.', substr($file, $visitPathLength, -10));
                if ($register) {
                    $list[$name] = substr($file, $basePathLength);
                }
                else {
                    unset($list[$name]);
                }
            }
        }
        $this->saveArray($manifest, $list);
    }
private function publishViews ( $ register ) { // read views from folder $ visitPath = $ this -> path . '/views' ; if ( ! file_exists ( $ visitPath ) ) { return ; } $ files = [ ] ; list_files ( $ files , $ visitPath , [ 'php' ] ) ; // update manifest $ manifest = $ this -> getManifest ( 'views' ) ; /** @noinspection PhpIncludeInspection */ $ list = file_exists ( $ manifest ) ? include $ manifest : [ ] ; $ visitPathLength = strlen ( $ visitPath ) + 1 ; $ basePathLength = strlen ( base_path ( ) ) + 1 ; foreach ( $ files as $ file ) { if ( substr ( $ file , - 10 ) == '.blade.php' ) { $ name = $ this -> plugin . '.' . str_replace ( DIRECTORY_SEPARATOR , '.' , substr ( $ file , $ visitPathLength , - 10 ) ) ; if ( $ register ) { $ list [ $ name ] = substr ( $ file , $ basePathLength ) ; } else { unset ( $ list [ $ name ] ) ; } } } $ this -> saveArray ( $ manifest , $ list ) ; }
Update manifest "views.php"

@param bool $register
Update manifest views . php