Giter VIP home page Giter VIP logo

Comments (3)

Pochwar avatar Pochwar commented on August 11, 2024

Hello,

There is a problem in the URL, it contains "undefined" when it shouldn't.

Axios has a default base URL defined to make the requests. It can be found in resources/js.app.js line 21.
As you can see, it uses the variable "process.env.MIX_APP_URL" and I think this variable is undefined and breaks the URL.

This variable "process.env.MIX_APP_URL" is retrieved when you compile the front (with 'npm run dev', 'npm run prod', 'npm run watch', ...) from the '.env' file at line 41.

This variable is set like this : MIX_APP_URL="${APP_URL}".
That means it takes the value of the variable "APP_URL" that id define above.

So make sure that "APP_URL" in your ".env" file is set with the value given by the 'php artisan serve' command (in your case: "http://127.0.0.1:8000")

from laravel-vue-spa.

atta1234 avatar atta1234 commented on August 11, 2024

here is the same question posted from someone and it work but why that dynamic url not working
https://stackoverflow.com/questions/56962901/laravel-websanova-vue-auth-login-register-returning-undefined-url

secondly in login function you have used this var redirect = this.$auth.redirect()
from where it's get the value or where is the function defined can you explain please

from laravel-vue-spa.

ssenol avatar ssenol commented on August 11, 2024

after install:

  • php artisan config:clear
  • php artisan cache:clear
  • npm run watch

from laravel-vue-spa.

Related Issues (10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.