Reputation: 66
I have a header file that links to the user dashboard that displays on all pages on my site, but if I access the link from a page such as localhost/pages/page
, I have to put href="../dashboard"
. If I am on the root directory (such as localhost/page
) then using href="dashboard"
works.
Is there a simpler way than changing the directories on every single page so I can just use href="dashboard"
on all pages?
Upvotes: 0
Views: 24
Reputation: 9873
Use url()
helper method:
<link rel="stylesheet" href="{{url('/dashboard/plugins/bootstrap/css/bootstrap.min.css')}}">
Upvotes: 2