TASKS 05 : Authentication & Admin Panel Scaffold - RadLeoOFC/laravel-admin-panel GitHub Wiki
Project Report: Laravel Authentication and Admin Panel Setup
Objective
Set up basic user authentication in Laravel and scaffold an admin panel layout using Blade, CSS, and HTML.
Steps Taken
1. Installation of Laravel Breeze
- Installed Laravel Breeze for quick scaffolding of authentication.
composer require laravel/breeze --dev
php artisan breeze:install
-
Selected Blade with Alpine as the preferred stack.
-
Chose not to include dark mode for simplicity.
-
Confirmed the usage of Pest for testing (default choice).
- Successful installation of Laravel Breeze

- Successful installation of Laravel Breeze
2. Setting Up Frontend Dependencies
- Installed frontend dependencies using npm:
npm install && npm run dev
-
Confirmed that Vite successfully compiled CSS and JS.
- Successful Vite compilation

- Successful Vite compilation
3. Database Migration for Authentication
- Ran migrations to create necessary tables (users, password_resets, etc.):
php artisan migrate
-
Verified tables are created without errors.
-
Migration status showing that authentication tables have been successfully created

-
Screenshot of the users table structure, showing authentication-related fields

-
Output of php artisan migrate showing that all migrations have already been applied

-
4. Testing Authentication
- Launched the Laravel server:
php artisan serve
-
Tested registration and login functionality at http://127.0.0.1:8000.
-
Verified user is redirected to
/dashboardupon login.- Login page displayed correctly for user authentication

- Login page displayed correctly for user authentication
5. Implementing Admin Panel Layout
-
Created
resources/views/layouts/admin.blade.phpfor the admin panel layout. -
Added navigation and styled it using Tailwind CSS.
- Initial layout of the admin panel with navigation and styling

- Initial layout of the admin panel with navigation and styling
6. Route Protection
- Restricted access to product and category management routes:
Route::middleware(['auth'])->group(function () {
Route::resource('products', ProductController::class);
Route::resource('categories', CategoryController::class);
});
-
Confirmed that unauthorized users are redirected to the login page.
- Access denied message for unauthenticated users

- Access denied message for unauthenticated users
7. GitHub Commit
- Committed changes to GitHub repository:
git add .
git commit -m "Added authentication and admin panel layout"
git push origin main
-
Verified changes are available in the repository.
- Successful commit and push to GitHub repository

- Successful commit and push to GitHub repository
Conclusion
User authentication was successfully implemented using Laravel Breeze, and a basic admin panel layout was developed with route protection. The authentication system ensures access to restricted parts of the application, such as product and category management, is available only to registered and authorized users.
The admin panel was created using Blade templates and CSS. Functionality is secured with the auth middleware, which restricts resource interaction to authorized users.
Database migrations were successfully performed, creating the necessary tables for storing users and related data.
Completed Tasks
- User Authentication: Functionality for user registration, login, and logout was implemented.
- Admin Panel Layout: A basic admin panel layout with a section for managing products was developed.
- Database Migrations: Tables (
users,password_reset_tokens, and more) were successfully created and verified. - Route Protection: Access to
/productsand/categoriesis restricted to authorized users only. - Frontend Integration: Blade templates and CSS were used without additional frontend frameworks.
- GitHub Deployment: All changes were committed and pushed to the repository.