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