Top 3 File Manager Packages for Laravel

Founder of QuickAdminPanel
Handling files is one of a usual routine in most web-projects, but it’s not so easy to build from scratch: file extensions, upload, thumbnails, security etc. So on top of Laravel Filesystem there are a few useful packages to help you.
1. UniSharp/laravel-filemanager
Released: October 2015
Installs: 54 000
Last update: May 2017 (6 days ago)
This package adds a convenient file manager on top of TinyMCE or CKEditor.
It’s quite easy to install – you just need to configure some things and put the URL in your JavaScript. Here’s how it looks for CKEditor:
<textarea id="my-editor" name="content" class="form-control">{!! old('content', 'test editor content') !!}</textarea> <script src="//cdn.ckeditor.com/4.6.2/standard/ckeditor.js"></script> <script> var options = { filebrowserImageBrowseUrl: '/laravel-filemanager?type=Images', filebrowserImageUploadUrl: '/laravel-filemanager/upload?type=Images&_token=', filebrowserBrowseUrl: '/laravel-filemanager?type=Files', filebrowserUploadUrl: '/laravel-filemanager/upload?type=Files&_token=' }; </script>
We actually use this package in our QuickAdminPanel generator, for Textarea fields with CKEditor, so I highly recommend it.
2. barryvdh/laravel-elfinder
Released: January 2014
Installs: 191 000
Last update: Jan 2017 (4 months ago)
This package is actually a Laravel-tailored wrapper for elFinder – open-source file manager for web, written in JavaScript using jQuery and jQuery UI.
It uses Laravel’s Filesystem, and also can be integrated into TinyMCE and CKEditor.
3. spatie/laravel-medialibrary
Released: August 2015
Installs: 178 000
Last update: May 2017 (1 day ago)
This one is a little different. It’s not a visual file manager, but it gives a set of functions to easily handle media/files in your Laravel app.
Their tagline is “Associate files with Eloquent models”, which doesn’t say much, but in reality it’s a powerful time-saver package. Here are some examples, you will understand everything then:
// Attach media file to any item $newsItem = News::find(1); $newsItem->addMedia($pathToFile)->toMediaCollection('images'); // Associate uploaded file with any collection $newsItem->addMedia($request->file('image'))->toMediaCollection('images'); // Yes, and it works with thumbnails, too! $newsItem->getMedia('images')->first()->getUrl('thumb');
Also it has an awesome clear documentation page.
So these packages are my personal Top 3. Anything to add to that list?
Try our QuickAdminPanel generator!
7 Comments
Leave a Reply Cancel reply
Recent Posts
Try our QuickAdminPanel Generator!
How it works:
1. Generate panel online
No coding required, you just choose menu items.
2. Download code & install locally
Install with simple "composer install" and "php artisan migrate".
3. Customize anything!
We give all the code, so you can change anything after download.
Here is another laravel image manager with cropping and generate images for different devices facilities.
https://github.com/asmmahmud/laravel-image-manager-cropper
Which file manager works best for isolating user access to only their own files, and how is that implemented?
You can use barryvdh/laravel-filemanager for that in that package you’ll find a config ‘allow_multi_user’ = true which is activated by default what it does is, restrict user to only access the files uploaded by them.
sorry *unisharp*/laravel-filemanager not barryvdh
i need tutorial about adding UniSharp/laravel-filemanager on laravel 6.0.
That package doesn’t support Laravel 6.0 yet. See its composer.json: https://github.com/UniSharp/laravel-filemanager/blob/master/composer.json
You can also use this.
https://github.com/alexusmai/laravel-file-manager