question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Return localhost instead of the contigured domain in virtual host

See original GitHub issue

Hi I tried this package, but during the implementation of the helper function route() it returns http://localhost/

In my project I set up a Virtual Host which point to localhost address I’ve been working on, The OS I’m using currently is windows 10,

For Example

  getData(route('ajax.get.event.list'), id, function(data) {
    data = data[0];
    data = editEventData(data);
    ...

the expected output should be http://liz.dev/users/org-adviser/get/event

the return instead is http://localhost/users/org-adviser/get/event

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
Soglcommented, May 26, 2019

@mattisbones @DanielCoulbourne I have the same problem in Laravel 5.6 and Ziggy 0.7.1.

What route function {{ route('permissions.create') }} returns in blade:

http://sogl.lar/manage/permissions/create

With Ziggy route('permissions.create') in Vue component:

http://localhost/manage/permissions/create

I use php artisan ziggy:generate without @routes blade directive and this method of using: https://github.com/tightenco/ziggy/issues/154#issuecomment-494563621

Last part from my ziggy.js generated file:

baseUrl: 'http://localhost/',
baseProtocol: 'http',
baseDomain: 'localhost',
basePort: false,
defaultParameters: []

p.s. I can open a new issue if needed.

1reaction
davi5ecommented, Aug 11, 2017

@mattstauffer That worked for me!

I was just wondering if this wouldn’t be better solved if the package were to detect the URL the same way Laravel does (as in Laravel’s route() facade, which never fails)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot Access Virtual Host Via Apache On Localhost
Hi Eric, all virtual hosts are already mapped in etc/hosts, domain is already defined, adding a search record to match makes no difference...
Read more >
Apache VirtualHost and localhost - Stack Overflow
conf, go to folder xampFolder/apache/bin, Shift + right click, open a terminal command here, open XAMPP (as you usually do), start Apache, and ......
Read more >
Return localhost instead of the contigured domain in virtual host
Hi I tried this package, but during the implementation of the helper function route() it returns http://localhost/.. In my project I set up...
Read more >
VirtualHost Examples - Apache HTTP Server Version 2.4
Requests for any address not specified in one of the <VirtualHost> directives (such as localhost , for example) will go to the main...
Read more >
Configure Virtual Hosts in an Environment - Bloomreach
The virtual hosts configuration is stored in the content repository and managed ... It configures the virtual host localhost for use in a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found