xpert / upload
this package used for file uploading
dev-main
2020-11-30 16:14 UTC
Requires
- intervention/image: ^2.5
This package is not auto-updated.
Last update: 2024-05-15 07:27:15 UTC
README
A package for convenient way to upload files to the different storages
Installation
- Run the command below to add this package:
composer require xpert/upload
- Open your
config/app.php
and add the following to the providers array:
Xpert\upload\UploadServiceProvider::class
- Open your
config/app.php
and add the following to the aliases array:
'FileUpload' => Xpert\upload\Facade\FileuploadFacade::class
- Run the command below to publish the package:
php artisan vendor:publish
Usage Controller
To upload file:
use FileUpload; public function upload(Request $request) { // This will upload your file to the upload package composer FileUpload::upload($request,'uploads/images','img'); }
package-FileuploadResize
A package for convenient way to upload files to Resize original file and thumbnail
Installation
- Run the command below to add this package:
composer require intervention/image
- Open your
config/app.php
and add the following to the providers array:
Intervention\Image\ImageServiceProvider::class
- Open your
config/app.php
and add the following to the aliases array:
'ImageResize' => Intervention\Image\Facades\Image::class
- Run the command below to publish the package:
php artisan vendor:publish
Usage Controller
To upload file:
use FileUpload; public function uploadWithResize(Request $request) { // This will upload your file to the resize upload. FileUpload::uploadResize($request,'uploads/original','uploads/thumbnail','image'); }