This bundle help the user input high quality data into your web services REST.
The OkaWorkerBundle has the following requirements:
Installation is a quick (I promise!) 3 step process:
Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:
$ composer require coka/worker-bundle
This command requires you to have Composer installed globally, as explained in the installation chapter of the Composer documentation.
Then, register the bundle by adding it to the list of registered bundles
in the config/bundles.php file of your project (Flex did it automatically):
return [
//...
Oka\WorkerBundle\OkaWorkerBundle::class => ['all' => true],
]
Now that the bundle is installed.
Create worker class.
// App\Worker\Worker.php
namespace App\Worker;
use Oka\WorkerBundle\AbstractWorker;
class FooWorker extends AbstractWorker
{
public static function getName(): string
{
return 'foo';
}
protected function doRun(array $options = []): bool
{
//...
}
}
Use the command line interface.
php bin/console oka:worker:run-worker foo
How can I help you explore Laravel packages today?