idea/uploader
Composer 安装命令:
composer require idea/uploader
包简介
Package For Uploading Files
README 文档
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.
统计信息
- 总下载量: 8
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2021-04-28