Laravel 4: Verify if a route exists or not

Aren’t those error pages ugly when you try to link to a route that doesn’t exist?

We can check if a route exists or not, with:

Or, if you like it more in php…

It will return true/false. Thank you, carbontwelve.

0 thoughts on “Laravel 4: Verify if a route exists or not

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">

No spam? * Time limit is exhausted. Please reload CAPTCHA.