Black Friday: the Laravel testing course is $149 instead of $249, through Dec 7. See the course →
logo

Redirect routes match all HTTP verbs

If you need to be more precise, here's a better way

Joel Clermont
Joel Clermont
2026-01-02

From our daily Laravel tips email. Get the next one in your inbox.

In the last video tip, I showed how route caching in CI catches bugs where code behaves differently.

The root problem is that Route::redirect matches all HTTP verbs, causing route overlap.

In today's video, I fix that root problem in a straightforward way.

Watch Now (3 min)

And after watching, don't forget to subscribe to our YouTube channel, so you don't miss future videos.

Here to help,

Joel

P.S. Want to catch these kinds of bugs before they hit production? Our testing course shows you how.

Want a tip like this in your inbox every weekday?

Each one takes less than 2 minutes to read. Join 4,000+ Laravel developers who already get them.

email
No spam. Only real-world advice.
Toss a coin in the jar if you found this helpful.