This system is my Final Year Project during 3rd-year at Universiti Teknikal Malaysia Melaka. As the name implies, it is an e-commerce website that selling a jewelry products.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
- Clone the repo and
cd
into it composer install
- Rename or copy
.env.example
file to.env
php artisan key:generate
- Set your database credentials in your
.env
file - Set your Stripe credentials in your
.env
file. SpecificallySTRIPE_KEY
andSTRIPE_SECRET
- Set your
APP_URL
in your.env
file. This is needed for Voyager to correctly resolve asset URLs. - Set
ADMIN_PASSWORD
in your.env
file if you want to specify an admin password. If not, the default password is 'password' npm install
npm run dev
php artisan serve
to run on localhost- Visit
localhost:8000
in your browser - Visit
/admin
if you want to access the Voyager admin backend. Admin User/Password:admin@admin.com/password
. Admin Web User/Password:adminweb@adminweb.com/password
Crinsane/LaravelShoppingcart - slow to update to the latest versions of Laravel hardevine/LaravelShoppingcart - updates quicker
The money_format
function does not work in Windows. Take a look at this thread. As an alternative, just use the number_format
function instead.
- In
app/helpers.php
replacemoney_format
line withreturn '$'.number_format($price / 100, 2);
- In
app/Product.php
replacemoney_format
line withreturn '$'.number_format($this->price / 100, 2);
- In
config/cart.php
set thethousand_seperator
to an empty string or you might get a 'non well formed numeric value encountered' error. It conflicts withnumber_format
.
- Laravel - The web framework used
- Voyager - An admin/backend interface for your Laravel app
- Stripe - Online payment gateway
- Andre Madarang - laravel-ecommerce-example - drehimself
- Hat tip to anyone whose code was used
- Inspiration
- etc