idea / uploader
Package For Uploading Files
Installs: 5
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Language:JavaScript
Requires
- php: >=7.2
- illuminate/database: >=5.0
- illuminate/support: >=5.0
Requires (Dev)
- phpunit/phpunit: ^9.5
This package is not auto-updated.
Last update: 2024-05-09 16:13:05 UTC
README
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 applicationIdea\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 migrateIn your controller
Use Traituse UploadableTrait;
from use Idea\Uploader\UploadableTrait;
In controller action function
$this->upload($request);
It will return the uploaded files Instances.