╔══════════════════════════════════════════════════════════════════════╗ ║ COMPLETE THESE STEPS NOW ║ ║ (5 Minutes Total) ║ ╚══════════════════════════════════════════════════════════════════════╝ ┌──────────────────────────────────────────────────────────────────────┐ │ STEP 1: START XAMPP (1 minute) │ ├──────────────────────────────────────────────────────────────────────┤ │ │ │ 1. Open XAMPP Control Panel │ │ 2. Click "Start" button next to Apache │ │ 3. Click "Start" button next to MySQL │ │ 4. Wait until both show green "Running" status │ │ │ │ ✅ Done when: Both Apache and MySQL are green/running │ └──────────────────────────────────────────────────────────────────────┘ ┌──────────────────────────────────────────────────────────────────────┐ │ STEP 2: CREATE DATABASE (1 minute) │ ├──────────────────────────────────────────────────────────────────────┤ │ │ │ 1. Open browser │ │ 2. Go to: http://localhost/phpmyadmin │ │ 3. Click "New" in the left sidebar │ │ 4. Enter database name: uok_laravel │ │ 5. Select collation: utf8mb4_general_ci │ │ 6. Click "Create" button │ │ │ │ ✅ Done when: Database "uok_laravel" appears in left sidebar │ └──────────────────────────────────────────────────────────────────────┘ ┌──────────────────────────────────────────────────────────────────────┐ │ STEP 3: UPDATE .ENV FILE (2 minutes) │ ├──────────────────────────────────────────────────────────────────────┤ │ │ │ 1. Open file: c:\xampp\htdocs\uok\.env │ │ │ │ 2. Find these lines (around line 23): │ │ DB_CONNECTION=sqlite │ │ # DB_HOST=127.0.0.1 │ │ # DB_PORT=3306 │ │ # DB_DATABASE=laravel │ │ # DB_USERNAME=root │ │ # DB_PASSWORD= │ │ │ │ 3. Replace with these lines: │ │ DB_CONNECTION=mysql │ │ DB_HOST=127.0.0.1 │ │ DB_PORT=3306 │ │ DB_DATABASE=uok_laravel │ │ DB_USERNAME=root │ │ DB_PASSWORD= │ │ │ │ 4. Save the file (Ctrl + S) │ │ │ │ ✅ Done when: File saved with MySQL configuration │ └──────────────────────────────────────────────────────────────────────┘ ┌──────────────────────────────────────────────────────────────────────┐ │ STEP 4: RUN SETUP (1 minute) │ ├──────────────────────────────────────────────────────────────────────┤ │ │ │ OPTION A - Easy Way: │ │ Double-click: setup.bat │ │ │ │ OPTION B - Manual Way: │ │ 1. Open Command Prompt or PowerShell │ │ 2. Run these commands: │ │ │ │ cd c:\xampp\htdocs\uok │ │ php artisan migrate:fresh --seed │ │ php artisan serve │ │ │ │ ✅ Done when: Server says "Server running on [http://127.0.0.1...]"│ └──────────────────────────────────────────────────────────────────────┘ ┌──────────────────────────────────────────────────────────────────────┐ │ STEP 5: ACCESS APPLICATION │ ├──────────────────────────────────────────────────────────────────────┤ │ │ │ 1. Open browser │ │ 2. Go to: http://localhost:8000 │ │ 3. You should see the homepage! │ │ │ │ ✅ Done when: Homepage loads successfully │ └──────────────────────────────────────────────────────────────────────┘ ┌──────────────────────────────────────────────────────────────────────┐ │ STEP 6: TEST LOGIN │ ├──────────────────────────────────────────────────────────────────────┤ │ │ │ TEST ADMIN LOGIN: │ │ 1. Click "Login" button │ │ 2. Email: admin@example.com │ │ 3. Password: password │ │ 4. Click "Log in" │ │ 5. You should see Admin Dashboard! │ │ │ │ TEST USER LOGIN: │ │ 1. Logout first │ │ 2. Click "Login" button │ │ 3. Email: user@example.com │ │ 4. Password: password │ │ 5. Click "Log in" │ │ 6. You should see User Dashboard! │ │ │ │ ✅ Done when: Both logins work correctly │ └──────────────────────────────────────────────────────────────────────┘ ╔══════════════════════════════════════════════════════════════════════╗ ║ QUICK COPY-PASTE ║ ╚══════════════════════════════════════════════════════════════════════╝ ┌──────────────────────────────────────────────────────────────────────┐ │ FOR .ENV FILE (Copy these 6 lines): │ ├──────────────────────────────────────────────────────────────────────┤ │ │ │ DB_CONNECTION=mysql │ │ DB_HOST=127.0.0.1 │ │ DB_PORT=3306 │ │ DB_DATABASE=uok_laravel │ │ DB_USERNAME=root │ │ DB_PASSWORD= │ │ │ └──────────────────────────────────────────────────────────────────────┘ ┌──────────────────────────────────────────────────────────────────────┐ │ FOR TERMINAL (Copy these commands): │ ├──────────────────────────────────────────────────────────────────────┤ │ │ │ cd c:\xampp\htdocs\uok │ │ php artisan migrate:fresh --seed │ │ php artisan serve │ │ │ └──────────────────────────────────────────────────────────────────────┘ ╔══════════════════════════════════════════════════════════════════════╗ ║ TROUBLESHOOTING ║ ╚══════════════════════════════════════════════════════════════════════╝ Problem: MySQL won't start in XAMPP Solution: - Check if port 3306 is already in use - Close Skype or other apps using port 3306 - Restart XAMPP as Administrator Problem: Can't access phpMyAdmin Solution: - Make sure Apache is running in XAMPP - Try: http://127.0.0.1/phpmyadmin Problem: Database connection error Solution: - Verify MySQL is running (green in XAMPP) - Check database "uok_laravel" exists - Verify .env file has correct settings Problem: Migration errors Solution: - Make sure database is created first - Check .env file is saved - Run: php artisan config:clear ╔══════════════════════════════════════════════════════════════════════╗ ║ AFTER SETUP IS COMPLETE ║ ╚══════════════════════════════════════════════════════════════════════╝ Your application will be running at: http://localhost:8000 Login Credentials: Admin: admin@example.com / password User: user@example.com / password Available Pages: Homepage: http://localhost:8000 Login: http://localhost:8000/login Register: http://localhost:8000/register User Dashboard: http://localhost:8000/dashboard Admin Dashboard: http://localhost:8000/admin/dashboard Profile: http://localhost:8000/profile ╔══════════════════════════════════════════════════════════════════════╗ ║ 🎉 THAT'S IT! YOUR APPLICATION IS READY TO USE! ║ ╚══════════════════════════════════════════════════════════════════════╝