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:

  {{ link_to_route('') }}

Or, if you like it more in php…

  echo link_to_route('');

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


    1. Wow… Nice. Could you tell me what you love about Laravel? Besides the huge number of files it loads for a simple page…

Leave a Reply

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

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