PHP code example of dealerinspire / laravel-operations

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

    

dealerinspire / laravel-operations example snippets


class ExampleOperation extends Operation
{
    public function run()
    {
        // Logic goes in here to be executed when the operation is run.
    }
}

'operations' => [
    \App\Operations\ExampleOperation::class,
],

// Using the facade.

use DealerInspire\Operations\Facades\Operator;

// ...

Operator::queue();

// Using an Operator instance.

use DealerInspire\Operations\Operator;

// ...

$operator = new Operator();
$operator->queue();
bash
php artisan vendor:publish --provider="DealerInspire\Operations\OperationServiceProvider"
bash
php artisan make:operation MyNewOperation