protected function breadcrumbs($folder)
    {
        $folder = trim($folder, '/');
        $folders = collect(explode('/', $folder));
        $path = '';

        return $folders->reduce(function ($crumbs, $folder) use (&$path) {
            $path .= '/'.$folder;
            $crumbs[$path] = $folder;

            return $crumbs;
        }, collect())->prepend($this->breadcrumbRootLabel, '/');
    }
protected function breadcrumbs($folder)
    {
        $folder = trim($folder, '/');
        $folders = collect(explode('/', $folder));
        $path = '';

        return $folders->reduce(function ($crumbs, $folder) use (&$path) {
            $path .= '/'.$folder;
            $crumbs[$path] = $folder;

            return $crumbs;
        }, collect())->prepend($this->breadcrumbRootLabel, '/');
    }
protected function breadcrumbs ( $ folder ) { $ folder = trim ( $ folder , '/' ) ; $ folders = collect ( explode ( '/' , $ folder ) ) ; $ path = '' ; return $ folders -> reduce ( function ( $ crumbs , $ folder ) use ( & $ path ) { $ path .= '/' . $ folder ; $ crumbs [ $ path ] = $ folder ; return $ crumbs ; } , collect ( ) ) -> prepend ( $ this -> breadcrumbRootLabel , '/' ) ; }
Return breadcrumbs to current folder.

@param $folder

@return Collection
Return breadcrumbs to current folder .