dev-master
9999999-dev https://github.com/andskur/LaraCartSimple Shoping Cart for Laravel framework
MIT
The Requires
- php >=5.5.9
- laravel/framework 5.4.*
- guzzlehttp/guzzle ^6.2
by Andrey Skurlatov
Simple Shoping Cart for Laravel framework
LaraCart is simple shoping Cart for Laravel framework, (*1)
composer require andskur/laracart
After installing, register the Andskur\LaraCart\LaraCartServiceProvider
in your config/app.php
configuration file:, (*2)
'providers' => [ // Other service providers... Andskur\LaraCart\LaraCartServiceProvider::class, ],
Also, add the LaraCart
facade to the aliases
array in your app
configuration file:, (*3)
'LaraCart' => Andskur\LaraCart\LaraCartFacade::class,
Add a new item., (*4)
example:, (*5)
$discount = [ "value" => 10, "type" => 'percent', "start" => 1496228400, "end" => 1497204305 ]; $subitems = [ [1, 1, 'salami', 23], [2, 3, 'pepper', 15] ]; LaraCart::storeItem(1, 4, 'pizza', 50, $discount, $subitems); ...
Add sub item., (*6)
example:, (*7)
LaraCart::addSubItem(2, 2, 'salami', 23, 1); ...
Check item., (*8)
example:, (*9)
LaraCart::checkItem($id); ...
All cart., (*10)
example:, (*11)
LaraCart::getAll(); ...
Get item., (*12)
example:, (*13)
LaraCart::getItem($id); ...
Remove item., (*14)
example:, (*15)
LaraCart::delItem($id); ...
Full price., (*16)
example:, (*17)
LaraCart::cartPrice(); ...
example:, (*18)
LaraCart::cartPriceDiscount(); ...
LaraCart is open-sourced software licensed under the MIT license, (*19)
Simple Shoping Cart for Laravel framework
MIT