0
According to the image inserted in the question, it is possible to see that the value of $location->url
is "www.google.pt".
The value does not contain the protocol, that is, it does not inform if the protocol is http
, https
, etc....
When this occurs, the browser understands that the value entered in the property href
is relative to the current URL, i.e.:
- Current URL: http://localhost/Manage/shops/
- Added value without protocol: www.google.pt
- URL: http://localhost/Manage/shops/www.google.en
If you add a bar at the beginning, with no protocol, the browser understands that the value entered in the property href
is related to the field:
- Current URL: http://localhost/Manage/shops/
- Domain: http://localhost
- Added value without protocol and with bar: /www.google.pt
- URL: http://localhost/www.google.pt
To resolve the issue, it is necessary to insert the desired protocol, for example the protocol https
:
<small><a href="https://{{ $location->url }}" target="_blank">Url mapa</a><small>
However, if it is a dynamic system, the protocol should not be set in HTML, since it may be different for each URL.
What is the content of
$location->url
?– RFL
@RFL www.google.pt
– eduardo costa
Eduardo, avoid putting code in images. Copy the code to the question.
– Filipe Moraes