The Advanced E-commerce Toolkit is a comprehensive Laravel package that provides everything needed to build a full-featured online store. It includes product catalog management (with variants/attributes), shopping cart, wishlist, checkout flow, Stripe/PayPal payments, order management, customer dashboards, admin panel, API endpoints, inventory tracking, coupons, reviews, shipping zones, loyalty points, and more.
Key benefits:
- Production-ready with migrations, factories, seeders, tests.
- Modular services (CartService, OrderService, PaymentService).
- Responsive Blade views for frontend + API support.
- Easy installation via Artisan commands.
Perfect for Laravel developers building SaaS, marketplaces, or custom stores.
| Requirement | Version |
|---|---|
| PHP | ^8.2 |
| Laravel | ^10.0 |^11.0 |^12.0 |^13.0 |
| Laravel Sanctum | ^3.0 |^4.0 |
| darkaonline/l5-swagger | ^8.5 |^9.0 |^10.0 |
Optional (suggested):
stripe/stripe-phpfor Stripe payments.
-
Install via Composer:
composer require jmrashed/ecommerce
-
Install package (registers provider, publishes assets):
php artisan ecommerce:install
Or manually:
php artisan vendor:publish --provider=\"Jmrashed\\Ecommerce\\EcommerceServiceProvider\" --tag=ecommerce-config php artisan vendor:publish --tag=ecommerce-views php artisan vendor:publish --tag=ecommerce-assets
-
Run migrations:
php artisan migrate
-
(Optional) Seed demo data:
php artisan ecommerce:seed
Copy config/ecommerce.php and update .env:
# Payments
STRIPE_KEY=pk_test_xxx
STRIPE_SECRET=sk_test_xxx
PAYPAL_CLIENT_ID=xxx
PAYPAL_SECRET=xxx
# Store
ECOMMERCE_CURRENCY=USD
ECOMMERCE_TAX_RATE=0.08
ECOMMERCE_DEFAULT_SHIPPING=5.00
# Other (full list in config/ecommerce.php)use Jmrashed\Ecommerce\Services\CartService;
use Jmrashed\Ecommerce\Models\Product;
// Add to cart
$cartService = app(CartService::class);
$cartService->add(1, 2); // product ID, quantity
// Totals with tax/shipping
$total = $cartService->getTotal();
$tax = $cartService->calculateTax($subtotal);use Jmrashed\Ecommerce\Services\OrderService;
// Create order from cart
$order = $orderService->createFromCart($userId, $address);use Jmrashed\Ecommerce\Services\PaymentService;
$paymentService = app(PaymentService::class);
$payment = $paymentService->processStripe($order, $token);Full API: /api/ecommerce/products, /api/ecommerce/cart, etc.
php artisan vendor:publish --tag=ecommerce-views # Blade templates
php artisan vendor:publish --tag=ecommerce-assets # CSS/JS
| Model | Purpose |
|---|---|
| Product | Catalog with images, variants, attributes |
| Category/Brand/Tag | Organization |
| CartItem/Wishlist | Session-based |
| Order/OrderItem | Full lifecycle |
| Payment/Refund | Gateways |
| Customer/Address | Accounts |
| Review/Coupon | Engagement |
| Service | Features |
|---|---|
| CartService | Add/remove, totals, tax/shipping calc |
| OrderService | Create, status update |
| PaymentService | Stripe/PayPal/COD |
| ProductService | Search/filter |
Web: /products, /cart, /checkout, /customer/*, /admin/ecommerce/*
API: /api/ecommerce/* (auth/products/cart/orders/payments)
composer test # All tests
composer test:unit # Unit
composer test:feature # Feature
composer test:coverage # Coverage reportScripts use ./run-tests.sh.
See CONTRIBUTING.md.
Report to SECURITY.md or jmrashed@gmail.com.
MIT. See LICENSE.
⭐ Star on GitHub