A full-featured e-commerce application built with Laravel, featuring Stripe integration, shopping cart functionality, and an admin dashboard.
- Live Demo: https://laravelecommerce.uk
- Video Tutorial Series: Watch on YouTube
Note: The demo site has limited permissions. For full access, please install locally.
- PHP >= 7.4
- Composer
- Node.js & NPM
- MySQL/PostgreSQL
- Stripe Account
- Algolia Account (for search functionality)
- Braintree Account (optional, for PayPal integration)
-
Clone the repository:
git clone https://github.com/yourusername/laravel-ecommerce-example.git cd laravel-ecommerce-example -
Install dependencies:
composer install npm install
-
Configure environment:
cp .env.example .env php artisan key:generate
-
Configure the following in your
.envfile:- Database credentials
STRIPE_KEYandSTRIPE_SECRETALGOLIA_APP_IDandALGOLIA_SECRETBT_MERCHANT_ID,BT_PUBLIC_KEY,BT_PRIVATE_KEY(for PayPal)APP_URLADMIN_PASSWORD(defaults to 'password' if not set)
-
Set up the application:
php artisan ecommerce:install npm run dev
-
Start the development server:
php artisan serve
-
Visit
http://localhost:8000in your browser
Access the Voyager admin backend at /admin with these credentials:
- Admin:
admin@admin.com/password - Web Admin:
adminweb@adminweb.com/password
We utilize hardevine/LaravelShoppingcart, a maintained fork of the original Crinsane package, chosen for its consistent updates and Laravel version compatibility.
For Windows users, replace the money_format() function (which is not supported on Windows) with the following modifications:
-
In
app/helpers.php:return '$'.number_format($price / 100, 2);
-
In
app/Product.php:return '$'.number_format($this->price / 100, 2);
-
In
config/cart.php:- Set
thousand_seperatorto an empty string to prevent numeric value errors
- Set
To begin from a particular point in the development:
- Clone the repository
- Checkout the desired commit:
git checkout <commit-hash>
- Follow the standard installation steps, but replace
php artisan ecommerce:installwith:php artisan migrate --seed
Please read our contributing guidelines before submitting pull requests.
This project is licensed under the MIT License - see the LICENSE file for details.
