- Notifications
You must be signed in to change notification settings - Fork576
Code for YouTube series on building a Laravel E-Commerce application.
drehimself/laravel-ecommerce-example
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Code for YouTube video series:https://www.youtube.com/watch?v=o5PWIuDTgxg&list=PLEhEHUEU3x5oPTli631ZX9cxl6cU_sDaR
Website Demo:https://laravelecommerceexample.ca. The demo has limited permissions. Install locally for full access.
- Clone the repo and
cdinto it composer install- Rename or copy
.env.examplefile to.env php artisan key:generate- Set your database credentials in your
.envfile - Set your Stripe credentials in your
.envfile. SpecificallySTRIPE_KEYandSTRIPE_SECRET - Set your Algolia credentials in your
.envfile. SpecificallyALGOLIA_APP_IDandALGOLIA_SECRET. Seethis episode. - Set your Braintree credentials in your
.envfile if you want to use PayPal. SpecificallyBT_MERCHANT_ID,BT_PUBLIC_KEY,BT_PRIVATE_KEY. Seethis episode. If you don't, it should still work but won't show the paypal payment at checkout. - Set your
APP_URLin your.envfile. This is needed for Voyager to correctly resolve asset URLs. - Set
ADMIN_PASSWORDin your.envfile if you want to specify an admin password. If not, the default password is 'password' php artisan ecommerce:install. This will migrate the database and run any seeders necessary. Seethis episode.npm installnpm run devphp artisan serveor use Laravel Valet or Laravel Homestead- Visit
localhost:8000in your browser - Visit
/adminif you want to access the Voyager admin backend. Admin User/Password:admin@admin.com/password. Admin Web User/Password:adminweb@adminweb.com/password
I originally used theCrinsane/LaravelShoppingcart package but it is slow to update to the latest versions of Laravel. I now usehardevine/LaravelShoppingcart which is a forked version that updates quicker.
Themoney_format function does not work in Windows. Take a look atthis thread. As an alternative, just use thenumber_format function instead.
- In
app/helpers.phpreplacemoney_formatline withreturn '$'.number_format($price / 100, 2); - In
app/Product.phpreplacemoney_formatline withreturn '$'.number_format($this->price / 100, 2); - In
config/cart.phpset thethousand_seperatorto an empty string or you might get a 'non well formed numeric value encountered' error. It conflicts withnumber_format.
If you would like to follow along from a particular point, follow these instructions. I'm going to be starting from my starting point in the first video of the series. You can choose any point by replacing the hash withany particular commit.
- Clone the repo and
cdinto it git checkout f4f651a8a35ebb2ff38ba15771fd65c93051f942- Follow the rest of the steps above. Instead of
php artisan ecommerce:install, migrate and seed the normal way withphp artisan migrate --seed
About
Code for YouTube series on building a Laravel E-Commerce application.
Topics
Resources
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors4
Uh oh!
There was an error while loading.Please reload this page.
