Skip to content

05.Producer

Muhammet ŞAFAK edited this page Aug 31, 2024 · 1 revision

Producer

Producer is the piece of code responsible for adding messages to the queue.

$queue = new \App\Queues\NotificationQueue();

$message = new \App\Messages\SMSMessage();

// Produce
$message->setPayload([
    'phone_number'  => '+905001111111',
    'content'       => 'Hello World',
]);
$queue->publish($message);
Clone this wiki locally