Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

238
Visualizações
Laravel URL Helper return IP address instead of Domain name

I have a problem when trying to create the Url using URL helper. I'm using Laravel 6.

$verify_url = url("/verify");

This is return the URL with the IP address instead of the domain name.

I don't know if it is a problem with the Apache server or the code.

Please help me. Thanks.

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

Adding this directive to Apache Virtual Host config seems to have fixed it: ProxyPreserveHost On

But a better way to use your urls is to name them in your routes/web.php. For ex:

Route::post('/verify', 'HomeController@verify')->name('verify');

and wherever you need to access to this url just use like this:

$verify_url = route('verify');
over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda