PHP code example of sarowar / laravel-dynamic-file-upload

1. Go to this page and download the library: Download sarowar/laravel-dynamic-file-upload library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

sarowar / laravel-dynamic-file-upload example snippets


composer 

php artisan vendor:publish --provider="Sarowar\LaravelFileUpload\FileUploadServiceProvider"


use Sarowar\LaravelFileUpload\FileUpload;

// Create an instance of the fileupload
$fileUpload = new FileUpload();

// Generate a fileupload
 $fileUpload->fileUpload( $uploadedFile, // Image object
            'uploads/',    // Upload directory
            'static-pdf',// Image name prefix
            '300',//width in this image 
            '300',// Height in this image
            'webp'// extension in this image if you want to change 
        );