In this lesson, we'll explore how to skip processing jobs conditionally in Laravel queues, when queued jobs should be bypassed instead of executed.
Don't Process Job On Condition
Sometimes you might need to skip processing a job based on certain conditions. For example, imagine you've delayed dispatching a job when a user registers (as we saw in a previous lesson), but by the time the job is processed, the user still hasn't verified their email, making the job unnecessary.
Laravel provides an elegant way to handle this using job middleware.
Using Skip Middleware
Jobs can have...