Today we're talking about how to wrap Laravel Http API client requests in Laravel Jobs for improved efficiency. But first, let's go over the requirements - not all API requests are suitable for this method.

You can control job execution using throttle middleware in Laravel, and monitor all jobs using Horizon with a REDIS queue worker.

Here's an example of how you can use Laravel Jobs to get newly created candidates from one service and update their gender using another API. First, we'll create a TrackNewlyCreatedCandidatesCommand that dispatches a job to fetch all newly created candidate HTTP client requests.
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future. Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future.
Community Partners