I am implementing axios in my application in Laravel
I had to do by hand the implementation of laravel mix
among other things.
Package.js
"devDependencies": {
"axios": "^0.18.0",
..
},
I already tried to include it in my app.js
and it does not work for me
import axios from 'axios'
Vue.use(axios)
Someone knows why I keep marking error
[Vue warn]: Error in created hook: "ReferenceError: axios is not defined"
Component
axios.get('api/bloques')
.then((res) => {
console.log(res)
})
.catch((err) => {
console.warn(err)
})
I do not know if I need to add it somewhere to use it globally.