Published 1/6/2024 · 2 min read
To see what you’ll be building, clone and run the example projects locally.
Project Repositories
Features Demonstrated
The demo application includes:
Authentication
- User registration with email verification
- Login/logout with session-based authentication
- Password reset via email
- “Remember me” functionality
User Management
- Update profile information
- Change password
- Upload avatar image
Authorization
- Role-based access control (admin vs regular user)
- Protected routes that require authentication
- Admin-only routes and content
API Features
- RESTful API design
- API resources for consistent JSON responses
- Pagination
- Error handling
Running Locally
1. Laravel API
git clone https://github.com/garethredfern/laravel-api.git
cd laravel-api
cp .env.example .env
composer install
./vendor/bin/sail up -d
./vendor/bin/sail artisan key:generate
./vendor/bin/sail artisan migrate --seed
2. Vue SPA
git clone https://github.com/garethredfern/laravel-vue.git
cd laravel-vue
cp .env.example .env
npm install
npm run dev
3. Test It Out
- Visit
http://localhost:5173 - Register a new account
- Check your email (or Mailpit at
http://localhost:8025) for verification - Log in and explore the dashboard
Default Test User
If you ran the database seeder, you can log in with:
- Email: test@example.com
- Password: password
Next up: Setting up authentication in the Laravel API.
Related Articles
- Form Handling: Moving from Vue to Svelte
A practical guide to translating Vue form patterns to Svelte, covering two-way binding, validation, async submission, and what actually works better in each framework.
- Building a Modal: Vue vs Svelte
A side-by-side comparison of building a modal component in Vue 3 and Svelte 5, exploring the differences in reactivity, props, and component patterns.
- Using Getters & Setters Vuex
A short article on using the getter and setter pattern to update data held in a Vuex store.