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.