Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

240
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!