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:
@if(Route::getRoutes()->hasNamedRoute('route.name')) {{ link_to_route('route.name') }} @endif
Or, if you like it more in php…
<?php if(Route::getRoutes()->hasNamedRoute('route.name')) { echo link_to_route('route.name'); } ?>
It will return true/false. Thank you, carbontwelve.
Thank you!
♥LARAVEL♥
Wow… Nice. Could you tell me what you love about Laravel? Besides the huge number of files it loads for a simple page…