2017 © Pedro Peláez
 

library laracart

Simple Shoping Cart for Laravel framework

image

andskur/laracart

Simple Shoping Cart for Laravel framework

  • Wednesday, June 14, 2017
  • by andskur
  • Repository
  • 1 Watchers
  • 0 Stars
  • 2 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

LaraCart

LaraCart is simple shoping Cart for Laravel framework, (*1)

Install

composer require andskur/laracart

Configuration

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,

Usage

Add item to cart

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 to cart row

Add sub item., (*6)

example:, (*7)


LaraCart::addSubItem(2, 2, 'salami', 23, 1); ...

Check item in cart

Check item., (*8)

example:, (*9)


LaraCart::checkItem($id); ...

Get all cart

All cart., (*10)

example:, (*11)


LaraCart::getAll(); ...

Get item from cart

Get item., (*12)

example:, (*13)


LaraCart::getItem($id); ...

Delete item from cart

Remove item., (*14)

example:, (*15)


LaraCart::delItem($id); ...

Get full cart total price

Full price., (*16)

example:, (*17)


LaraCart::cartPrice(); ...

Get full cart total price with discount

example:, (*18)


LaraCart::cartPriceDiscount(); ...

License

LaraCart is open-sourced software licensed under the MIT license, (*19)

The Versions

14/06 2017

dev-master

9999999-dev https://github.com/andskur/LaraCart

Simple Shoping Cart for Laravel framework

  Sources   Download

MIT

The Requires

 

by Andrey Skurlatov