There is this series: https://laracasts.com/series/advanced-image-uploading-with-vue-and-laravel
For users viewing only their files, of course implement authorization through a route. Also view some of the Flexbox videos.
I'm looking to create a file/media manager for my project just like the one wordpress has, so the user can upload and select images, although i have never worked with files/folders before besides uploading. Anyone has any tips from where to start to create a tree view with the public folders and files?
I'm not looking for packages.
There is this series: https://laracasts.com/series/advanced-image-uploading-with-vue-and-laravel
For users viewing only their files, of course implement authorization through a route. Also view some of the Flexbox videos.
@jlrdw Not quite what I'm looking for, I'm trying to create a file manager to handle files and folders.
@Stelikas So create one?
You’ve already mentioned WordPress’s. So create a database table to hold image paths, and then a UI to display images as a list or grid or whatever.
@martinbean I was looking if someone knew any tutorials/courses and best practices on using Laravel Filesystem, how to obtain folder and files in paths, create, edit, move, delete them and much more.
The logic is more complicated than what you are saying.
Anyway, looking around i stumbled upon the FilesystemReader::listContents amazing method which makes life a lot easier and you can use it like that
$files = Storage::disk('public')->listContents(); it basically creates an array with all the files and directories in the public folder and that's all i needed to have a great start, update coming soon for the people looking to build a custom media library.
More details: https://flysystem.thephpleague.com/docs/usage/filesystem-api/
@Stelikas I know you said no packages, but have a look at the one spatie has. You can probably get some ideas from it.
@Stelikas I know the logic is “complicated”. But by the same token, you basically opened a question going, “I want to build X” with no mention of what you’ve tried, what parts you’re struggling with, so you’re essentially asking someone to tell you how to do it step by step, or give you a link to a tutorial that tells you how to do it step by step.
Personally, one of the best things about programming is the joy you get from building things yourself, and figuring out problems on your own, and not just copying code from a tutorial to “build” something.
@martinbean Well why of course, i completely agree with you, i don't think i mentioned above anything related on copying code, just asked for useful tips and tutorials on how to manage files and folders using Laravel like the comment i wrote above with the useful method i found, i think that's what discussions are like Martin and thats how the learning process actually works. Might be wrong though. Good Day to you lad. 🙂
@folium I'm aware of Spatie Media Library, it doesn't manage files, it associates files with eloquent models, which is pretty useful and I'm gonna use it together with the custom file manager I'm creating.
@Stelikas you can also use this package.....
https://www.itsolutionstuff.com/post/laravel-file-manager-tutorial-step-by-stepexample.html
@folium Thank you for your tips, although, as i said, I'm not looking for packages, I'm trying to create a custom functionality like the one wordpress has, so when an administrator tries to upload an image a pop up opens up with a media library UI displaying all the images so the user can select images or upload. Also, I'm already using this package as a file manager but the functionalities it has can't really support what I'm looking for.
@Stelikas Hope Someone Find Your needs Thanks....
@folium I'm actually already implementing the solution, i will post updates soon for anyone interested in creating a custom media library like the one wordpress has.
@Stelikas I need this solution. could you please help me ?
@Stelikas I need this solution. could you find this solution?
Please or to participate in this conversation.