Skip to content

vfreitas-/laravel-shopping-cart

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

laravel-shopping-cart

A flexible and lightweight Shopping Cart manager.

Installation

1 - Dependency

The first step is using composer to install the package and automatically update your composer.json file, you can do this by running:

not released yet

2 - Provider

You need to update your application configuration in order to register the package so it can be loaded by Laravel, just update your config/app.php file adding the following code at the end of your 'providers' section:

config/app.php

//...
    'providers' => [
        // other providers ommited
        ShoppingCart\Providers\ShoppingCartServiceProvider::class,
    ],
//...

3 - Facade

In order to use the ShoppingCart facade, you need to register it on the config/app.php file, you can do that the following way:

//...
    'aliases' => [
        // other Facades ommited
        'ShoppingCart'   => ShoppingCart\Facades\ShoppingCart::class
    ],
//...

4 - Configuration

Publish config

In your terminal type

php artisan vendor:publish

or

php artisan vendor:publish --provider="ShoppingCart\Providers\ShoppingCartServiceProvider"

5 - Usage

6 - Tests and Codesniffer(PSR2)

To run tests

phpunit

To run the codesniffer coverage

composer cs

or

composer run-script cs

About

A flexible and lightweight Shopping Cart manager.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages