Sending an email or generating a PDF can take 2–3 seconds. Instead of making your user wait on a loading spinner, dispatch a Job (implementing ShouldQueue) so a background worker processes it asynchronously while the HTTP response returns instantly!
ADVERTISEMENT