A Laravel 10 web application for booking and managing appointments for a health & fitness service ("Bro. Health"). Members register, log in, and request appointments or submit scheduling forms; an admin dashboard lets staff review, edit, and delete every submission.
Originally built as a group coursework project. The front end uses Bootstrap 5, and the back end is a standard Laravel 10 application backed by SQLite.
- Authentication — register, login, logout, password reset, and email verification (Laravel UI + Bootstrap scaffolding).
- Role-based access control — every user has a
role(0= member,1= admin). TheisAdminmiddleware guards all/adminroutes. - Appointment booking — members pick a person, date, time, and details, and submit an appointment request.
- Scheduling forms — members submit a form (time slot, day, up to three classes, and comments).
- Admin dashboard — list, view, edit, and delete all submitted forms and appointments, with pagination.
- Database views —
ShowAllFormsandAllAppointmentjoin user data with submissions for convenient read-only listings.
| Layer | Tools |
|---|---|
| Framework | Laravel 10 (PHP 8.1+) |
| Auth | Laravel UI, Laravel Sanctum |
| Front end | Bootstrap 5, Sass, Axios, built with Vite |
| Database | SQLite (default) — MySQL also supported |
| Testing | PHPUnit 10 |
# 1. Clone the repository
git clone https://github.com/LingSy12/AppointmentForm.git
cd AppointmentForm
# 2. Install PHP and JavaScript dependencies
composer install
npm install
# 3. Create your environment file
cp .env.example .env
# 4. Generate the application key
php artisan key:generateCreate the SQLite database file and point .env at it:
# Create the empty database file
# macOS / Linux:
touch database/database.sqlite
# Windows (PowerShell):
# New-Item database/database.sqlite -ItemType FileThen edit .env so the database section reads:
DB_CONNECTION=sqlite
# (remove or comment out DB_HOST, DB_PORT, DB_DATABASE, DB_USERNAME, DB_PASSWORD)Prefer MySQL? Leave the
DB_*values from.env.examplein place and create a matching database instead. Note that the view migrations use SQLite syntax and may need minor adjustments on MySQL.
php artisan migrate
php artisan db:seedBy default DatabaseSeeder generates sample users, forms, and appointments via
factories. To create the admin account, run the dedicated seeder:
php artisan db:seed --class=UserTableSeederThis creates an administrator you can log in with:
| Password | Role | |
|---|---|---|
admin@example.com |
password |
admin |
⚠️ Change this password before deploying anywhere public.
# Compile front-end assets (use `npm run dev` for hot reloading during development)
npm run build
# Start the development server
php artisan serveThe app is now available at http://localhost:8000.
- Visiting
/shows the login page. New users can register at/register. - After logging in, members land on
/homeand can:- submit a scheduling form at
/form, - book an appointment via the Make Appointment button (
/make-appointment/{userId}), - read team bios at
/aboutme.
- submit a scheduling form at
- Admins (role
1) additionally have access to the/admin/*routes for managing all submissions. Non-admins are redirected to/home.
| Method | URI | Access | Description |
|---|---|---|---|
GET |
/ |
Public | Login page |
GET/POST |
/register, /login |
Public | Auth (Laravel UI) |
GET |
/home |
Auth | Member home |
GET/POST |
/form |
Auth | View / submit a scheduling form |
GET |
/make-appointment/{userId} |
Auth | Appointment booking page |
POST |
/submit-appointment/{userId} |
Auth | Submit an appointment |
GET |
/aboutme |
Auth | Team / about page |
GET |
/admin/showform |
Admin | List all submitted forms |
GET |
/admin/readform/{id} |
Admin | View a single form |
GET/PATCH |
/admin/updateform/{id} |
Admin | Edit a form |
DELETE |
/admin/showform/{id} |
Admin | Delete a form |
GET |
/admin/AllAppointment/{userId} |
Admin | List all appointments |
DELETE |
/admin/AllAppointment/{userId} |
Admin | Delete an appointment |
- users —
name,email,password,role(0member /1admin) - forms —
user_id,slot,day,class1–class3,comments - appointments —
user_id,selected_person,appointment_time,appointment_date,details - ShowAllForms / AllAppointment — SQL views joining the above with
users
php artisan testReleased under the MIT License, the same license as the underlying Laravel framework.