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': '',
'store': '',
'statuses': ''
}
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?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire