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

Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge. Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge.
Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Shirts painstakingly handcrafted by under-caffeinated developers. Shirts painstakingly handcrafted by under-caffeinated developers.
Community Partners