K
K
kfedor2017-02-16 22:53:23
Laravel
kfedor, 2017-02-16 22:53:23

How to link to an external site in Laravel?

How to link to an external site in Laravel? I use the output of a link from the database in the form of {{ $item->link }}. In html, a normal link of the form "link.ru" is displayed (seen in the screenshot), but when clicked, it redirects to "LOCALHOST/link.ru". How to fix?
822f3bf4cd194d5e97d210ffef63b066.png

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
Eugene, 2017-02-16
@kfedor

add http:// before the link, or //

A
Andrzej Wielski, 2017-02-16
@wielski

Good to write
{{ url('http://link.ru') }}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question