JWT Authentication for SPA with Laravel and Vue.js: Part 2
I will discuss how to set up JWT Authentication system in Laravel Application step by step.
1. Install Laravel: I think this part is easy. Just follow the instruction of Laravel Documentation. Even then I am telling. If you don't install composer, then firstly install composer from here.
Then goto xampp/wamp folder, in htdocs run termical and write this code.
In this step I will create a form of Registration in Vue Components. I will not show how to create a Components and do any style here. Just a simple form with Vue.js. And here I will submit this form with Ajax. In vuejs, ajax request is called withaxios. I have to install axios with this command: npm install --save axios vue-axios
15. You have to install Vue-Router for routing with Vue.js. Run this command to install vue-router: npm install vue-router --save
Now add this to app.js
import VueRouter from 'vue-router'