tighten / ziggy

Use your Laravel routes in JavaScript.
MIT License
3.91k stars 246 forks source link

Generated routes do not retain the port number #374

Closed they-cloned-me closed 3 years ago

they-cloned-me commented 3 years ago

Description

I'm using Ziggy with on a Laravel/Vue project. I installed and configured ziggy as per the documentation, .i.e

@routes
<script src="{{ mix('/js/app.js') }}" defer></script>

My app.js looks like:

import { createApp, h } from 'vue'

const app = createApp({
  // ...
})

app.mixin({
  methods: { route: window.route }
})

Every looks good, except my routes are missing the port number. instead of: localhost:8000/home, I have: localhost/home

How can I configure it to add the port number (when I'm using on my local machine)? Thanks

Environment

bakerkretzmar commented 3 years ago

@fsavalam for now as a quick fix, it should work if you add :8000 to your APP_URL environment variable.

It seems like #334 may have broken automatic support for ports... I'll look into that.

they-cloned-me commented 3 years ago

Thanks