Open

Description
Please specify which version of Browsersync, node and npm you're running
"browser-sync": "^2.24.4",
"browser-sync-webpack-plugin": "2.0.1",
Affected platforms
- windows
Browsersync use-case
- webpack
- laravel
for all other use-cases, (gulp, grunt etc), please show us exactly how you're using Browsersync
So I am using laravel and Browsersync for live reloading. In my webpack I have the following:
mix.js('resources/assets/js/app.js', 'public/js')
.postCss('resources/assets/css/app.css', 'public/css', [
tailwindcss('./tailwind.js')
])
.browserSync(
{
proxy: 'http://twitter.test/',
host: 'twitter.test',
open: 'external'
});
This makes my webpage: http://twitter.test:3000
, so in my blade file I can print my urls like so:
routes = {
'index': '{{ route("timeline.index") }}',
'store': '{{ route("timeline.store") }}',
'statuses': '{{ route("timeline.index") }}'
}
Which gives me the following:
routes = {
'index': '//twitter.test:3000/timeline',
'store': '//twitter.test:3000/timeline',
'statuses': '//twitter.test:3000/timeline'
}
Notce the :3000 port is in the URLS, which is what I want... Now if I go to my controller, and DD
dd(route("timeline.index"));
I get the following (which is expected; but note I am DD, not echoing)
"//twitter.test:3000/timeline"
BUT Now, if I change it to echo, like so:
echo route("timeline.index");
I get the url, without the port like so:
http://twitter.test/timeline
What is causing this, and is there a fix?
Metadata
Metadata
Assignees
Labels
No labels