PHP code example of fulfillment / laravel-triaged-queues
1. Go to this page and download the library: Download fulfillment/laravel-triaged-queues 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/ */
fulfillment / laravel-triaged-queues example snippets
class CallAuthenticatableQueuedHandler extends CallQueuedHandler
{
public function call(Job $job, array $data)
{
$command = $this->setJobInstanceIfNecessary(
$job, unserialize($data['command'])
);
// pipe an authentication middleware before the command is fired
$this->dispatcher->pipeThrough([AuthenticateDispatchedJob::class])->dispatchNow($command, function ($handler) use ($job) {
$this->setJobInstanceIfNecessary($job, $handler);
});
if (! $job->isDeletedOrReleased()) {
$job->delete();
}
}
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.