PHP code example of codegor / laravel-file-process

1. Go to this page and download the library: Download codegor/laravel-file-process 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/ */

    

codegor / laravel-file-process example snippets


    composer 

    php artisan vendor:publish --provider="Codegor\Upload\Providers\UploadServiceProvider" --tag=config
    

    'extantion' => 'jpeg,jpg,png,bmp,svg,gif,pdf,doc,docx,xls,xlsx',
    

    UPLOAD_SECRET=TZi+PA3dT8BR7yproQcqUryieefUbp3iedGQXCMvcSA=
    UPLOAD_VI=+dOnDRg9kO8arkWlsLDyMQ==
    

    
    echo 'UPLOAD_SECRET='.base64_encode(openssl_random_pseudo_bytes(32));
    echo PHP_EOL;
    echo 'UPLOAD_VI='.base64_encode(openssl_random_pseudo_bytes(openssl_cipher_iv_length('AES-256-CBC')));
    

   'route_group' => [... your group route config],
   

$url = \Codegor\Upload\Store::uploadFileRndName($extentionOfFile, $base64DataOfFile); 
// $url = '/file/xozYGselci9i70cTdmpvWkrYvGN9AmA7djc5eOcFoAM='