Comments (3)
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.
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.
after install:
php artisan config:clear
php artisan cache:clear
npm run watch
from laravel-vue-spa.
Related Issues (10)
- The token has been blacklisted HOT 2
- Login/Registration
- Token Automatic refresh not working
- Cors policy HOT 2
- issue while installing HOT 1
- No input file specified. HOT 1
- {"error":"Unauthorized"} issue in laravel 5.8 and latest vuejs HOT 2
- admin role not recognised HOT 1
- browsersync not working HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from laravel-vue-spa.