xpert/upload

this package used for file uploading

dev-main 2020-11-30 16:14 UTC

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

Latest Version Issues Stars Total Downloads

Installation

  1. Run the command below to add this package:
composer require xpert/upload
  1. Open your config/app.php and add the following to the providers array:
Xpert\upload\UploadServiceProvider::class
  1. Open your config/app.php and add the following to the aliases array:
'FileUpload' => Xpert\upload\Facade\FileuploadFacade::class
  1. 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

  1. Run the command below to add this package:
composer require intervention/image
  1. Open your config/app.php and add the following to the providers array:
Intervention\Image\ImageServiceProvider::class
  1. Open your config/app.php and add the following to the aliases array:
'ImageResize' => Intervention\Image\Facades\Image::class
  1. 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');

}