I am trying to display a specific link on all the pages in my web application. The link is given below
<a href="my-link">Some text for the link!</a>
My routes file
Route::get('home', 'HomeController@index');
Route::get('path1/path2/path3', 'SomeController@someFunction');
Route::get('my-link', 'SomeController@myLink');
While browsing the web application, when I am at mydoamin.com/home, the link address is mydomain.com/my-link, which is correct.
But when I am at the URL http://ift.tt/1Y5USJl, the link address becomes http://ift.tt/1Ul2qSA. Hence, after clicking the link I get 404 error as the path doesn't exist.
How do I make the link to always show mydomain.com/my-link on all the pages without hard-coding the domain name?
Note: I have put the link code <a href="my-link">Some text for the link!</a> in a partial file; and I am including that file in all the pages.
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire