Learn Vue JS course Learn Javascript and Vue JS Learn VueJS course Learn VueJS Tutorial

Laravel Backends for Vue.js 3

This lesson is free, but it requires you to Log in

Don't have an account? Enroll for free

Register Users with Laravel Fortify for a Vue.js SPA

In this lesson, we start adding the Vue.js code to get the registration page working. This requires making an ajax request to the /api/register route provided by the Laravel backend.

We also need to ensure we have the CSRF token set as a cookie. You can do this once on load, by making a request to /sanctum/csrf-cookie.

We also setup axios to include cookies in the ajax requests with the withCredentials option.

Links