Skip to content

${redev}

Published 1/6/2024 · 2 min read

Tags: vue , laravel , demo , spa

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

  1. Visit http://localhost:5173
  2. Register a new account
  3. Check your email (or Mailpit at http://localhost:8025) for verification
  4. Log in and explore the dashboard

Default Test User

If you ran the database seeder, you can log in with:


Next up: Setting up authentication in the Laravel API.

Related Articles