public function detect(): Collection
    {
        $path = \rtrim($this->publicPath, '/').'/themes/';

        return Collection::make($this->files->directories($path))->mapWithKeys(function ($folder) {
            return [
                $this->parseThemeNameFromPath($folder) => new Manifest($this->files, \rtrim($folder, '/').'/'),
            ];
        });
    }
public function detect(): Collection
    {
        $path = \rtrim($this->publicPath, '/').'/themes/';

        return Collection::make($this->files->directories($path))->mapWithKeys(function ($folder) {
            return [
                $this->parseThemeNameFromPath($folder) => new Manifest($this->files, \rtrim($folder, '/').'/'),
            ];
        });
    }
public function detect ( ) : Collection { $ path = \ rtrim ( $ this -> publicPath , '/' ) . '/themes/' ; return Collection :: make ( $ this -> files -> directories ( $ path ) ) -> mapWithKeys ( function ( $ folder ) { return [ $ this -> parseThemeNameFromPath ( $ folder ) => new Manifest ( $ this -> files , \ rtrim ( $ folder , '/' ) . '/' ) , ] ; } ) ; }
Detect available themes.

@throws \RuntimeException

@return \Illuminate\Support\Collection
Detect available themes .