PHPackages                             ewvlnet/dropzone - 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. ewvlnet/dropzone

ActiveLibrary

ewvlnet/dropzone
================

This package allows you to manage files in resources such as pages and posts in an laravel application.

1.0.0(4y ago)015MITBlade

Since Apr 17Pushed 4y ago1 watchersCompare

[ Source](https://github.com/ewvlnet/dropzone)[ Packagist](https://packagist.org/packages/ewvlnet/dropzone)[ RSS](/packages/ewvlnet-dropzone/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

Laravel Package Dropzone
========================

[](#laravel-package-dropzone)

Dropzone is a package that allows you to upload files associated with resources such as users, posts and whatever else you want.

### 🔧 Installing in a Laravel project

[](#-installing-in-a-laravel-project)

See instructions at:

```
composer require ewvlnet/dropzone

```

Add the FileTrait in the Models you want to work with dropzone, for example in a Model Post.

```
use Ewvlnet\Dropzone\Models\Traits\FileTrait;

class Post extends Model
{
    use HasFactory, FileTrait;

    /* ... Rest of the code... */

```

Create the migration file below in your project 2022\_01\_01\_000008\_create\_files\_table

This migration file must be run after migrations it references foreign, so in the example below where we use as foreign of 'post\_id' and 'user\_id', we must be sure that these migrations have already been executed before, otherwise we will get an error, when you run your migrations. Set the date in the filename so it always runs last.

```
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
    /**
     * Run the migrations.
     *
     * @return  void
     */
    public function up()
    {
         Schema::create('files', function (Blueprint $table) {
             $table->id();

             $table->unsignedBigInteger('user_id')->nullable();
             $table->unsignedBigInteger('post_id')->nullable();

             $table->string('name')->nullable();
             $table->string('type')->nullable();
             $table->string('url')->nullable();

             $table->foreign('user_id')->references('id')->on('users')->onDelete('cascade');
             $table->foreign('post_id')->references('id')->on('posts')->onDelete('cascade');

             $table->timestamps();
         });
    }

    /**
     * Reverse the migrations.
     *
     * @return  void
     */
    public function down()
    {
         Schema::dropIfExists('files');
    }
}

```

Run the migration

```
php artisan migrate

```

In the dropzone-uploader.blade.php and dropzone-gallery.blade.php files, push('css') and push('js') are used, remember to include this in your master layout to load the necessary scripts.

```
@stack('css')
@stack('js')

```

Now, you can include the blade component below in an edit.blade.php file for example.

```

```

If you haven't already done so, run the command to publish the "symbolic link", to be able to see the images of the storage folder.

```
php artisan storage:link

```

To display the gallery ( usually where you retrieve the model, such as a post.show.blade.php ).

```

```

If you want to associate other models to work with dropzone-uploader, just edit the migration file of the package, adding more models in the table, as in the example below:

```
/**
* Adding Tags and Categories
*/

$table->unsignedBigInteger('tag_id')->nullable();
$table->unsignedBigInteger('category_id')->nullable();

$table->foreign('tag_id')->references('id')->on('tags')->onDelete('cascade');
$table->foreign('category_id')->references('id')->on('categories')->onDelete('cascade');

```

Publish components and assets in your application and customize as you wish.

```
php artisan vendor:publish --provider="Ewvlnet\Dropzone\DropzoneServiceProvider

```

📄 License
---------

[](#-license)

[MIT](./LICENSE.md)

Follow [ewvl.net](https://ewvl.net) ✌️ 👺 ✌️
-------------------------------------------

[](#follow-ewvlnet-️--️)

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1492d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/a73f5fe214608cc5bf91f14d8ad8278a273d2ba9cb0c7dccbba6f7caadea70a9?d=identicon)[ewvlnet](/maintainers/ewvlnet)

---

Top Contributors

[![ewvlnet](https://avatars.githubusercontent.com/u/100207189?v=4)](https://github.com/ewvlnet "ewvlnet (2 commits)")

### Embed Badge

![Health badge](/badges/ewvlnet-dropzone/health.svg)

```
[![Health](https://phpackages.com/badges/ewvlnet-dropzone/health.svg)](https://phpackages.com/packages/ewvlnet-dropzone)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
