This repository contains the complete source code for the tutorial:
👉 Laravel 12 Vue 3 Session Based Authentication – Full Guide
Read the full tutorial here:
https://laravelcenter.com/laravel-12-vue-3-session-based-authentication/
This project demonstrates how to build a session-based authentication system using Laravel 12 + Vue 3, with CSRF protection, Axios, and a simple SPA structure.
- Laravel session-based login & registration
- Built-in CSRF token protection
- Vue 3 Composition API
- Axios with credentials-based requests
- Protected routes using navigation guards
- User login, logout, and profile retrieval
- Bootstrap UI for fast development
- Clean and extendable folder structure
# Clone this repository
git clone https://github.com/YourUsername/laravel-vue-session-auth.git
cd laravel-vue-session-auth
# Install backend dependencies
composer install
# Install frontend dependencies
npm install
# Build frontend assets
npm run dev
# Configure environment
cp .env.example .env
php artisan key:generate
# Setup database connection in .env
# Then run migrations
php artisan migrate
# Start the development server
php artisan serve
- Laravel 12
- Vue.js 3
- Axios
- Bootstrap 5
- PHP 8.3+
- MySQL 8+
Follow the full step-by-step tutorial here: https://laravelcenter.com/laravel-12-vue-3-session-based-authentication
laravel | vue | vue3 | axios | authentication | session-authentication | csrf | bootstrap | spa | laravel-vue | web-development | tutorial
If this tutorial helps you, please star this repository and follow me on GitHub.
Your support motivates me to create more high-quality, free tutorials.
