src/Http/Controllers/VoyagerMediaController.php
public function get_all_dirs(Request $request)
    {
        $folderLocation = $request->folder_location;

        if (is_array($folderLocation)) {
            $folderLocation = rtrim(implode('/', $folderLocation), '/');
        }

        $location = "{$this->directory}/{$folderLocation}";

        return response()->json(
            str_replace($location, '', Storage::disk($this->filesystem)->directories($location))
        );
    }
public function get_all_dirs(Request $request)
    {
        $folderLocation = $request->folder_location;

        if (is_array($folderLocation)) {
            $folderLocation = rtrim(implode('/', $folderLocation), '/');
        }

        $location = "{$this->directory}/{$folderLocation}";

        return response()->json(
            str_replace($location, '', Storage::disk($this->filesystem)->directories($location))
        );
    }
public function get_all_dirs ( Request $ request ) { $ folderLocation = $ request -> folder_location ; if ( is_array ( $ folderLocation ) ) { $ folderLocation = rtrim ( implode ( '/' , $ folderLocation ) , '/' ) ; } $ location = "{$this->directory}/{$folderLocation}" ; return response ( ) -> json ( str_replace ( $ location , '' , Storage :: disk ( $ this -> filesystem ) -> directories ( $ location ) ) ) ; }
GET ALL DIRECTORIES Working with Laravel 5.3
GET ALL DIRECTORIES Working with Laravel 5 . 3