A full-featured e-commerce web application built with Laravel, supporting both customer-facing and admin functionalities including product management, shopping cart, order processing, wishlist, and a complete admin dashboard.
- User registration, login, and logout (via Laravel Sanctum + Jetstream)
- Browse and view product listings
- Product detail pages
- Shopping cart (add, remove, update)
- Wishlist management
- Place and track orders
- Multi-language support (Arabic / English)
- Admin dashboard for managing products and orders
- Create, edit, update, and delete products
- Manage and update order statuses
- Manage users (view, update, delete)
- Language switching for the admin panel
e-commerce_php2/
├── app/
│ ├── Http/
│ │ ├── Controllers/
│ │ │ ├── Admin/
│ │ │ │ ├── ProductController.php
│ │ │ │ └── UserController.php
│ │ │ ├── Api/
│ │ │ │ ├── AuthController.php
│ │ │ │ └── ProductController.php
│ │ │ ├── User/
│ │ │ │ └── UserProductController.php
│ │ │ ├── HomeController.php
│ │ │ ├── OrderController.php
│ │ │ ├── SmsController.php
│ │ │ └── WishlistController.php
│ │ ├── Middleware/
│ │ │ ├── AdminMiddleware.php
│ │ │ ├── AuthAdminMiddleware.php
│ │ │ ├── AuthMiddleware.php
│ │ │ ├── LangMiddleware.php
│ │ │ └── UserMiddleware.php
│ │ └── Requests/
│ │ └── LoginRequest.php
│ ├── Models/
│ │ ├── Order.php
│ │ ├── OrderItem.php
│ │ ├── Product.php
│ │ ├── User.php
│ │ └── Wishlist.php
│ ├── Repositories/
│ │ ├── Interfaces/
│ │ │ └── OrderRepositoryInterface.php
│ │ └── OrderRepository.php
│ ├── Mail/
│ │ └── WelocomMail.php
│ ├── OpenApi/
│ │ └── ApiDocumentation.php
│ └── Providers/
│ ├── AppServiceProvider.php
│ ├── FortifyServiceProvider.php
│ └── JetstreamServiceProvider.php
├── resources/
│ └── views/
│ ├── auth/
│ ├── user/
│ │ ├── cart/
│ │ ├── layouts/
│ │ ├── order/
│ │ ├── product/
│ │ └── wishlist/
│ ├── components/
│ ├── emails/
│ └── layouts/
├── routes/
│ ├── api.php
│ ├── console.php
│ └── web.php
└── ...
| Method | URI | Name | Description |
|---|---|---|---|
| GET | / |
dashboard |
Home / Dashboard |
| GET | /login |
login |
Login page |
| GET | /register |
register |
Registration page |
| POST | /logout |
admin.logout |
Logout |
| Method | URI | Name | Description |
|---|---|---|---|
| GET | /products |
user.products.all |
List all products |
| GET | /product/show/{id} |
user.product.show |
Product details |
| GET | /cart |
user.cart |
View cart |
| POST | /addToCart/{id} |
user.addToCart |
Add to cart |
| DELETE | /cart/{id} |
cart.delete |
Remove from cart |
| GET | /wishlist |
user.wishlist.all |
View wishlist |
| POST | /addToWishlist/{id} |
user.addToWishlist |
Add to wishlist |
| DELETE | /wishlist/{id} |
user.wishlist.delete |
Remove from wishlist |
| GET | /orders |
user.orders.all |
View orders |
| POST | /orders |
user.orders.makeOrder |
Place order |
| Method | URI | Name | Description |
|---|---|---|---|
| GET | /dashboard |
dashboard |
Admin dashboard |
| GET | /usersControl |
admin.user.all |
Manage users |
| DELETE | /usersControl/{id} |
admin.user.delete |
Delete user |
| PUT | /usersControl/{id} |
admin.user.update |
Update user |
| GET | /product |
admin.product.all |
All products |
| GET | /create |
admin.product.create |
Create product form |
| POST | /store |
admin.product.create |
Store product |
| DELETE | /deleteProduct/{id} |
admin.product.delete.create |
Delete product |
| GET | /editProduct/{id} |
admin.product.edit |
Edit product form |
| PUT | /updateProduct/{id} |
admin.product.update |
Update product |
| GET | /ordersAdmin |
admin.orders.all |
All orders |
| PUT | /ordersAdmin/{id} |
admin.orders.update |
Update order status |
| GET | /change-language/{lang} |
admin.change-language |
Switch language |
| Layer | Technology |
|---|---|
| Backend | Laravel (PHP) |
| Authentication | Laravel Sanctum + Jetstream |
| Frontend | Blade Templates + Bootstrap 4 |
| Database | MySQL |
| JS Libraries | jQuery, Slick, Owl Carousel, Isotope, Accordions |
| Laravel Mail (WelocomMail) | |
| API Docs | OpenAPI (ApiDocumentation.php) |
| SMS | SmsController (integrated) |
| i18n | Arabic / English (LangMiddleware) |
- PHP >= 8.0
- Composer
- Node.js & npm
- MySQL
# 1. Clone the repository
git clone https://github.com/mamdouh19952/e-commerce_php2.git
cd e-commerce_php2
# 2. Install PHP dependencies
composer install
# 3. Install Node dependencies
npm install && npm run dev
# 4. Copy environment file and configure
cp .env.example .env
# 5. Generate application key
php artisan key:generate
# 6. Set up database in .env, then run migrations
php artisan migrate --seed
# 7. Link storage
php artisan storage:link
# 8. Serve the application
php artisan serveThe project includes a RESTful API layer under routes/api.php with:
- Auth endpoints (
AuthController) - Product endpoints (
Api/ProductController) - API documentation via
OpenApi/ApiDocumentation.php
| Middleware | Purpose |
|---|---|
auth |
Ensures user is authenticated |
admin |
Restricts access to admin routes |
AuthAdminMiddleware |
Combined auth + admin check |
LangMiddleware |
Sets app language per session |
UserMiddleware |
User-specific checks |
verified |
Ensures email is verified |
resources/views/
├── user/
│ ├── layouts/ → app, body, header, footer, nav
│ ├── product/ → index, show
│ ├── cart/ → index
│ ├── order/ → (order views)
│ └── wishlist/ → index
├── auth/ → login, register
├── dashboard.blade.php
└── navigation-menu.blade.php
Project running locally at
http://127.0.0.1:8000viaphp artisan serve
Mamdouh Mahmoud
Full Stack Laravel Developer
This project is open-source and available under the MIT License.