PHPackages                             codingo-me/dropzoner - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. codingo-me/dropzoner

AbandonedArchivedLibrary

codingo-me/dropzoner
====================

Simpe Laravel package for image uploads using DropzoneJS library

1.0.0(10y ago)4616.7k↓50%15[2 issues](https://github.com/codingo-me/dropzoner/issues)MITPHPPHP &gt;=5.4.0

Since Dec 26Pushed 9y ago5 watchersCompare

[ Source](https://github.com/codingo-me/dropzoner)[ Packagist](https://packagist.org/packages/codingo-me/dropzoner)[ RSS](/packages/codingo-me-dropzoner/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (2)Used By (0)

Dropzoner - Laravel package for image upload using DropzoneJS
=============================================================

[](#dropzoner---laravel-package-for-image-upload-using-dropzonejs)

[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](https://github.com/codingo-me/dropzoner/blob/master/LICENSE)[![Total Downloads](https://camo.githubusercontent.com/e8659fabe78032de99edf497495d92d062c4c35c2326beba0d50466d3819cff4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f636f64696e676f2d6d652f64726f707a6f6e65722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/codingo-me/dropzoner)

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
-----

[](#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.

### Namespace

[](#namespace)

Package uses **Codingo\\Dropzoner** namespace.

### Assets

[](#assets)

In head section of your page add DropzoneJS stylesheet file.

```
