Monday, May 22, 2017

Simple File Manager in Laravel with ACL

i want to implement a simple file manager in laravel with access control list. User can create nested folders and can upload files in the nested folders. I tried Unisharp Filemanager and i tried to use Laravel File Storage System but was unsuccessful. I want to return all the directories in a hierarchical. Whenever i return the list of directories using Storage::allDirectories($directory); i get the whole path. I want to display directories name only like below but still loads the contents of that particular folder when i click or expand it. I believe i should create and array of objects, and run Storage::allDirectories($directory); in recursive then push to the array but i do not know how. Can someone guide please. thank you

root
  FOLDER 1
    FOLDER 1.1
    FOLDER 1.2
      FOLDER 1.2.1
  FOLDER 2
    FOLDER 2.1
      FOLDER 2.1.1
        FOLDER 2.1.1.1



via Aatish Kumar

Advertisement