Linking in Laravel Blade Template

laravel, laravel-blade, php

Solution

HTML::linkAction /

have a look at the docs for more :)

laravel helpers

Problem

I am quite new to Laravel but I've watched quite a lot of tutorials to get into it, so I am used to it now. However, I am stuck at a point where I want to link to a users favorites in one of my blade.php files. This is the link in my bootstrap navbar: ``` <li><a href="{{ URL::to('users/' . $user->id . '/favortites' }}"><i class="fa fa-heart"> </i> Favorites</a></li> ``` I have tried using URL::to but it does not work. I am not sure whether I am implementing the userId correctly. In the end the link I want to access should look like this: users/5/favorites if the user with an id of 5 is the authenticated user. I would really appreciate some help here. Thank you.

Original source