A files and images management user interface with file uploading support. (Works well with CKEditor and TinyMCE)
PR is welcome!
- The project was forked from tsawler/laravel-filemanager
- Customizable routes and middlewares
- Supported locales : en, fr, pt-BR, tr, zh-CN, zh-TW
- Supports public and private folders for multi users
- Supports multi-level folders
- Supports using independently(see integration doc)
composer update unisharp/laravel-filemanager
php artisan vendor:publish --tag=lfm_view --force
php artisan vendor:publish --tag=lfm_config --force
(IMPORTANT: please backup your ownconfig/lfm.php
first)
- Independent usage example :
- List view :
- Grid view :
To use events you can add a listener to listen to the events
Snippet for EventServiceProvider
protected $listen = [
ImageWasUploaded::class => [
UploadListener::class,
],
];
The UploadListener
will look like:
class UploadListener
{
public function handle($event)
{
$method = 'on'.class_basename($event);
if (method_exists($this, $method)) {
call_user_func([$this, $method], $event);
}
}
public function onImageWasUploaded(ImageWasUploaded $event)
{
$path = $event->path();
//your code, for example resizing and cropping
}
}
List of events:
- Unisharp\Laravelfilemanager\Events\ImageWasUploaded
- All contibutors from GitHub. (issues / PR)
- Special thanks to
- @taswler the original author.
- @olivervogel for the awesome image library
- @welcoMattic providing fr translations and lots of bugfixes.
- @fraterblack TinyMCE 4 support and pt-BR translations.
- @1dot44mb tr translations.
- @Nikita240 fixing controller extending errors.
- @amin101 guide for independent use and fixes for url/directory error on Windows
- @nasirkhan bug fixes and alphanumeric filename check
- All @UniSharp members