import/use axios or any other libraries in Vue components

I used to do this in main.js: import axios from ‘axios’ window.axios = axios and use window.axios in components. This forum reply suggested a much better solution: // main.js import Vue from ‘vue’; import axios from ‘axios’; Vue.prototype.$http = axios; // or $axios or whatever you want // component.js // … methods: { getItems […]

Laravel deployment on shared hosting – .htaccess rewrite rule

One problem I just ran into when I tried to deploy a Laravel app to my shared hosting service Siteground. I copied my repo to a subdomain folder and ran the usual php and composer commands to set everything up. But I had to use the url to actually access the app’s public folder. […]