0π
β
-
Replace vue-resource with axios. Easy to do. Vue-resource is not longer maintained by Vue team, so itβs bad choice to use it.( https://medium.com/the-vue-point/retiring-vue-resource-871a82880af4#.dwmy5ymjx )
Axios is widely supported. https://github.com/mzabriskie/axios .
Nice laracasts about using axios with vue. You will quickly get it. https://laracasts.com/series/learn-vue-2-step-by-step/episodes/18
-
It is normal that you canβt access Vue instance in your auth module. Try to learn more about using
this
and you will quickly get it βwhy?β -
To make ajax requests in your auth module, just import axios and use
axios.post
/axios.get
Any questions? Comment and I will explain more.
π€Marek Urbanowicz
Source:stackexchange.com