PHP code example of timmylindh / laravel-batch-dispatcher

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

    

timmylindh / laravel-batch-dispatcher example snippets


return [
  "enabled" => env("BATCH_DISPATCHER_ENABLED", true),

  /**
   * In testing, avoid serializing jobs and run the wrapper immediately for assertions
   */
  "synchronous_testing" => env(
    "BATCH_DISPATCHER_SYNC_TESTING",
    env("APP_ENV") === "testing"
  ),

  /**
   * Maximum number of buffered items (jobs + queued listeners)
   * per wrapper job. When exceeded, multiple wrapper jobs will be dispatched.
   */
  "max_batch_size" => env("BATCH_DISPATCHER_MAX_SIZE", 10),

  /**
   * Enable the middleware to batch the requests.
   * Otherwise you will have to manually wrap the routes in the middleware.
   */
  "enable_middleware" => env("BATCH_DISPATCHER_ENABLE_MIDDLEWARE", true),
];
bash
php artisan vendor:publish --tag="laravel-batch-dispatcher-config"
bash
php artisan vendor:publish --tag="laravel-batch-dispatcher-config"