Generate Root Domain URLs Inside Laravel Subdomain Routes: clone UrlGenerator
Originally published at recca0120.github.io
Inside a Laravel subdomain route, url('test') returns https://foo.com/test.
But if you need a link to the main site — for an email, or an API response — that's wrong.
Clone a UrlGenerator and call useOrigin...
recca0120.hashnode.dev3 min read