There is a sentence in the documentation for upgrading to laravel 5.4 that I don’t understand. Documentation: http://laravelacademy.org/pos...
In order to be compatible with Laravel 5.4 and the Axios JavaScript library, Laravel Passport has released version 2.0.0. If you upgrade from Laravel 5.3 and use the preset Passport Vue component, you need to ensure that the Axios library is in the form of axios. The application is globally valid.
I don’t understand the above sentence, what should I do?
阿神2017-05-16 16:49:50
This is described in the official documentation
If you are upgrading from Laravel 5.3 and using the pre-built Passport Vue components, you should make sure the Axios library is globally available to your application as axios.
Actually, if your application is upgraded from Laravel 5.3 and you use the built-in Passport
Vue组件的话,应该确保Axios
类库是全局可用的,而使用它的时候必须是使用axios
作为类库的名字。说白了就是在页面中直接引入(比如使用script src=xxx)axios
这个类库就可以了,如果没有使用到Passport
Vue component, then this can be ignored.