readme.md

Dropzoner - Laravel package for image upload using DropzoneJS

This is the simplest Laravel package for image uploads using DropzoneJS.

You pull it via composer, set service provider and include it in your views with @include('dropzoner::dropzone'). After this you need to set JS and CSS files in header and footer.
Dropzone will take full width of parent container, and will throw events on image upload and image delete actions.
Using event listeners you can hook this package with the rest of your application.

Package uses Image Intervention library for saving images. It has its own filename sanitizer and method for creating unique filenames inside upload directory.

Guide

Require package in your Laravel project with:

composer require codingo-me/dropzoner

Now modify app.php config file and add Dropzoner Service Provider.

Codingo\Dropzoner\DropzonerServiceProvider::class

After setting service provider you need to publish Dropzoners configuration file and assets:

php artisan vendor:publish

When you publish these files, you will be able to modify Dropzoner configuration. There you'll find validator array and validator-messages array.

You also need to add upload path into .env file using key DROPZONER_UPLOAD_PATH. This directory should be write-able by web server, and it needs to end with trailing slash.