This e-commerce platform is built with Laravel and includes the following features:
- Product browsing with category filtering
- Product details with image gallery
- Shopping cart with AJAX functionality (add, update, remove items without page reload)
- "Buy Now" feature for direct checkout from product pages
- User registration and authentication
- Checkout with authentication requirement
- Multiple payment methods (Cash on Delivery, Credit/Debit Card)
- Coupon code system for discounts
- Order history and tracking
- Order cancellation functionality
- Contact form
- Secure admin authentication system (separate from customer login)
- Dashboard with sales analytics
- Product management with image upload and drag-and-drop reordering
- Category management
- Order management with Amazon-style status updates
- Coupon management (fixed amount and percentage discounts)
- User management
- Contact message management
- Cash on Delivery (COD) payment option
- Credit/Debit Card payments (Credit/Debit Card (Visa/Mastercard/American Express/UnionPay))
- Pakistani Rupee (₨) currency support
- Payment status tracking
- Secure payment processing
- Responsive design with Bootstrap 5
- AJAX cart operations for seamless user experience
- Image optimization and thumbnail generation
- Security measures to prevent unauthorized access
- User-specific order protection
- Form data preservation during checkout process
Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experience to be truly fulfilling. Laravel takes the pain out of development by easing common tasks used in many web projects, such as:
- Simple, fast routing engine.
- Powerful dependency injection container.
- Multiple back-ends for session and cache storage.
- Expressive, intuitive database ORM.
- Database agnostic schema migrations.
- Robust background job processing.
- Real-time event broadcasting.
Laravel is accessible, powerful, and provides tools required for large, robust applications.
Laravel has the most extensive and thorough documentation and video tutorial library of all modern web application frameworks, making it a breeze to get started with the framework.
You may also try the Laravel Bootcamp, where you will be guided through building a modern Laravel application from scratch.
If you don't feel like reading, Laracasts can help. Laracasts contains thousands of video tutorials on a range of topics including Laravel, modern PHP, unit testing, and JavaScript. Boost your skills by digging into our comprehensive video library.
We would like to extend our thanks to the following sponsors for funding Laravel development. If you are interested in becoming a sponsor, please visit the Laravel Partners program.
The platform implements an Amazon-style order status system:
- Order Received: Initial status when an order is placed
- Preparing for Shipment: Order is being processed and prepared
- Shipped: Order has been shipped to the customer
- Delivered: Order has been successfully delivered
- Cancelled: Order has been cancelled by customer or admin
Customers can cancel orders only when they are in "Order Received" or "Preparing for Shipment" status.
The platform includes a flexible coupon system with the following features:
- Discount Types: Fixed amount (₨) or percentage (%) discounts
- Usage Limits: Set maximum number of times a coupon can be used
- Minimum Order Amount: Set minimum purchase requirement for coupon eligibility
- Validity Period: Set start and expiration dates for coupons
- Coupon Status: Enable/disable coupons as needed
Coupons are applied at checkout and automatically validated before application.
- Clone the repository
- Run
composer install - Copy
.env.exampleto.envand configure your database - Run
php artisan migrate --seedto create the database tables and seed with sample data - Run
php artisan storage:linkto create the symbolic link for uploads - Run
php artisan key:generateto generate an application key - Run
php artisan serveto start the development server
An admin user is created during seeding with the following credentials:
- Email: admin@example.com
- Password: admin123
Alternatively, you can run the setup script to create or update the admin user:
php setup_admin.php
The platform supports multiple payment methods:
- Enabled by default, no additional configuration required
To configure card payments:
- Copy the required environment variables from
stripe-env-example.txtto your.envfile - Update with your payment gateway credentials:
# Payment Gateway API Keys
STRIPE_KEY=pk_test_your_publishable_key
STRIPE_SECRET=sk_test_your_secret_key
STRIPE_WEBHOOK_SECRET=whsec_your_webhook_secret
STRIPE_WEBHOOK_TOLERANCE=300
For production, replace the test keys with live keys from your payment gateway provider.
The platform includes the following security features:
- Separate admin authentication system
- Admin users are prevented from using the public login page
- Regular users are prevented from accessing admin functionality
- Order information is protected - users can only see their own orders
- Authentication required for checkout and order management
- Secure payment processing with industry-standard practices
- CSRF protection for all forms
- Input validation and sanitization throughout the application
Thank you for considering contributing to the Laravel framework! The contribution guide can be found in the Laravel documentation.
In order to ensure that the Laravel community is welcoming to all, please review and abide by the Code of Conduct.
If you discover a security vulnerability within Laravel, please send an e-mail to Taylor Otwell via taylor@laravel.com. All security vulnerabilities will be promptly addressed.
The Laravel framework is open-sourced software licensed under the MIT license.