PHP code example of aminrafiei / laravel-chunker

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

    

aminrafiei / laravel-chunker example snippets


return [
    'save_path' => storage_path('chunker'),
    'storage_driver' => \Aminrafiei\Chunker\Services\File\SimpleDiskService::class,
];


  use Aminrafiei\Chunker\Facades\Chunker;

  $chunkId = Chunker::init($name, $type, $totalChunks, $totalSize);

  use Aminrafiei\Chunker\Facades\Chunker;

  Chunker::progress($chunkId, $chunkNumber, $file);

  use Aminrafiei\Chunker\Facades\Chunker;

  $response = Chunker::done($chunkId);
  $path = $response->getRealPath();
bash
  php artisan vendor:publish