A Laravel 11 e-commerce application with customer authentication and admin backend.
- Public Home Page: Browse products
- Customer Authentication: Register, login, view order history
- Admin Backend: Manage products and categories
- Role-based Access: Admins have full backend access
- PHP 8.2+
- Composer
- Node.js & NPM
-
Install PHP dependencies:
cd shop composer install -
Generate application key:
php artisan key:generate
-
Run migrations and seed the database:
php artisan migrate --seed
-
Create storage link for uploaded images:
php artisan storage:link
-
Install Node dependencies and build assets:
npm install npm run build
-
Start the development server:
php artisan serve
-
Visit
http://localhost:8000
- Email: admin@example.com
- Password: password
app/
├── Http/Controllers/
│ ├── HomeController.php # Public product listing
│ ├── OrderController.php # Customer order history
│ └── Admin/ # Admin controllers
├── Models/ # Eloquent models
└── Http/Middleware/
└── AdminMiddleware.php # Admin access control
resources/views/
├── home.blade.php # Public home page
├── orders/ # Customer order views
└── admin/ # Admin panel views
| Route | Description |
|---|---|
/ |
Home page with products |
/login |
Customer login |
/register |
Customer registration |
/orders |
Customer order history |
/admin |
Admin dashboard |
/admin/products |
Manage products |
/admin/categories |
Manage categories |
For development with hot reloading:
npm run devMIT License