Skip to content

aman5440/laraveluploader

Repository files navigation

laraveluploader

This package uses the dorpzone wrapped in a Laravel's blade component, provides the functionality to Upload Multiple files. It also allows you to linkthe uploaded files to link with related table.

Installation via composer

composer require idea/uploader

Integration Steps

After composer command, copy the service provider path and pase in app.php of your application

Idea\Uploader\UploaderService::class

jQuery Dependency

As mentioned, this package is using the Dropzone.js, jQuery must be loaded before dropzone. For this functiontionality, you must include jQuery in your layout File. We are doing this jQuery file sepration, only to prevent JS conflicts. So you must have only One jQuery File throughout the application. Here is some code from layout file

<script src="https://code.jquery.com/jquery-3.6.0.min.js" crossorigin="anonymous"></script>

@stack('scripts')

Route Declaration

Philosophy of this package is to provide freedom to link uploaded file to with any section of application. For this you must have control on the uploading functionality. That's why this package need a route, the endpoint.

< x-myuploader-uploader-form action="claimFileUpload"/>

You need to use this in your application's blade file, where the action is end point.

Next Step

php artisan migrate

In your controller

Use Trait
use UploadableTrait;
from use Idea\Uploader\UploadableTrait;

In controller action function
$this->upload($request);

It will return the uploaded files Instances.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published