savanihd/image-upload-laravel

v1.0.7 2019-10-03 12:56 UTC

This package is auto-updated.

Last update: 2024-09-29 05:28:47 UTC


README

Install Package By using bellow command:

composer require savanihd/image-upload-laravel

You need to update on config/app.php file

'providers' => [
    ...
    SavaniHD\ImageUploadLaravel\ImageUploadLaravelServiceProvider::class
]
'aliases' => [
    ...
    'ImageUploadLaravel' => SavaniHD\ImageUploadLaravel\Facades\ImageUploadHDLaravelFacade::class,
]

You can use as bellow: upload method will return name of uploaded file. if you upload same file name file than it will return name like this way: test.png. test-1.png, test-2.png etc Syntax:

ImageUploadLaravel::upload(file_object, folder_path)

Example:

$fileName = ImageUploadLaravel::upload($request->image, public_path('images'))

dd($fileName);

Supported By: https://itsolutionstuff.com