yesteamtech/laravel-file-manager

A file upload/editor intended for use with Laravel 5 and CKEditor


Keywords
image, file, manager, upload, CKEditor, laravel, filemanager
License
MIT

Documentation

Laravel Filemanager

Latest Stable Version Total Downloads Latest Unstable Version License

A files and images management user interface with file uploading support. (Works well with CKEditor and TinyMCE)

PR is welcome!

Overview

  • The project was forked from tsawler/laravel-filemanager
  • Customizable routes and middlewares
  • Supported locales : en, fr, bg, tr, fa, es, 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)

Documents

  1. Installation
  2. Intergration
  3. Config
  4. Customization

Upgrade guide

  • 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 own config/lfm.php first)

Screenshots

  • Independent usage example :

Independent usage example

  • List view :

FileManager screenshot 1

  • Grid view :

FileManager screenshot 2

Events

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:

  • Yesteamtech\Laravelfilemanager\Events\ImageWasUploaded

Credits