protected static function getAllPaths()
    {
        $paths = Cache::read('paths', 'static_pages');

        if (empty($paths)) {
            //Adds all plugins to paths
            $paths = collection(Plugin::all())
                ->map(function ($plugin) {
                    return self::getPluginPath($plugin);
                })
                ->filter(function ($path) {
                    return file_exists($path);
                })
                ->toList();

            //Adds APP to paths
            array_unshift($paths, self::getAppPath());

            Cache::write('paths', $paths, 'static_pages');
        }

        return $paths;
    }
protected static function getAllPaths()
    {
        $paths = Cache::read('paths', 'static_pages');

        if (empty($paths)) {
            //Adds all plugins to paths
            $paths = collection(Plugin::all())
                ->map(function ($plugin) {
                    return self::getPluginPath($plugin);
                })
                ->filter(function ($path) {
                    return file_exists($path);
                })
                ->toList();

            //Adds APP to paths
            array_unshift($paths, self::getAppPath());

            Cache::write('paths', $paths, 'static_pages');
        }

        return $paths;
    }
protected static function getAllPaths ( ) { $ paths = Cache :: read ( 'paths' , 'static_pages' ) ; if ( empty ( $ paths ) ) { //Adds all plugins to paths $ paths = collection ( Plugin :: all ( ) ) -> map ( function ( $ plugin ) { return self :: getPluginPath ( $ plugin ) ; } ) -> filter ( function ( $ path ) { return file_exists ( $ path ) ; } ) -> toList ( ) ; //Adds APP to paths array_unshift ( $ paths , self :: getAppPath ( ) ) ; Cache :: write ( 'paths' , $ paths , 'static_pages' ) ; } return $ paths ; }
Internal method to get all paths for static pages
@return array
@uses MeCms\Core\Plugin::all()
@uses getAppPath()
@uses getPluginPath()
Internal method to get all paths for static pages