Routes within a domain group do not work correctly
See original GitHub issueMissing Protocol
When using routes in a domain group, the domain is added by the js route() function, but there is no protocol attached, so the url returned is incorrect.
in web.php
Route::domain('example.org')->group(function() {
Route::get('/help', function () {
return 'help';
})
->name('help');
});
in blade/js
route('help');
// returns 'example.org/help'
// instead of '//example.org/help'
// or 'http://example.org/help'
Missing Port
Another thing is that if Laravel is running under example.org:81 the php route() function adds the :81 to the url, if its the current domain.
If the current URL is ‘http://example.org:81/home’
dump(route('help'));
// returns 'http://example.org:81/help'
but in JS
route('help');
// returns 'example.org/help'
// instead of '//example.org:81/help'
// or 'http://example.org:81/help'
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Domain Route Group not working - Laracasts
I have the following code: Route::group(['domain' => '{account}.domain.tld'], function () { Route::get('/{name?}', function ($account , $name = 'lionel') ...
Read more >Laravel Route::group[] not working correctly - Stack Overflow
I am expecting to see in names admin.index, admin.another,... However, if I use the Route::name function, it will work correctly. Route ...
Read more >Routes with domains are serving the wrong controller #73
Issue: Because Laravel processes routes on a first-come-first-serve basis, if you have routes with the same URI on different domains, it doesn't matter ......
Read more >How To Set Up Routing and Remote Access - Windows Server
In this article. Summary. This article describes how to set up routing and remote access for an Intranet. Applies to: Windows Server 2012...
Read more >Troubleshoot and Solve Domain-Join Problems - BeyondTrust
Solve Domain-Join Problems · Verify that the Name Server Can Find the Domain · Make Sure the Client Can Reach the Domain Controller...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Thanks for the merge
sorry i am a little bit under load at the moment, maybe can have a look this weekend.