Level 46
Don't use the url function.
Summer Sale! All accounts are 50% off this week.
I am getting url's from my database and trying to create links to them with blade.
I have this;
@foreach($videos as $video)
<li><a href="{{ url($video->url) }}"> {{ $video->name }} </a></li>
@endforeach
which is generating links to (for example if the video url is www.google.com) http://localhost:8000/www.google.com
I cannot figure out how to remove the http://localhost:8000/ and generate a link to the database url without the web root
Thanks
Try prepending http:// to the URL.
It looks to be a problem with local and absolute URLs
Please or to participate in this conversation.