PHP code example of orrison / laravel-are-we-there-yet

1. Go to this page and download the library: Download orrison/laravel-are-we-there-yet 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/ */

    

orrison / laravel-are-we-there-yet example snippets


    /**
     * parallelDispatch
     *
     * @param mixed $jobList An array of job objects you would like dispatched and tracked.
     * Adding a multidimensional array will dispatch the sub-array in a job chain in the order they are listed
     * @param object $completionJob A fully instantiated class for the job to be run once all other jobs in the job list have completed.
     * @return void
     */
    function parallelDispatch($jobList, $completionJob)

    parallelDispatch(
        [
            new JobOne(),
            new JobTwo($arg1, $arg2),
        ],
        new SomeJobToBeRunAfter($someJobArg)
    );

    parallelDispatch(
        [
            new JobOne(),
            [
                new chainedJobOne($arg1),
                new chainedJobTwo(),
            ],
            new JobTwo($arg1, $arg2),
        ],
        new SomeJobToBeRunAfter($someJobArg)
    );
shell script
php artisan migrate