witify / laravel-cart
Highly flexible cart for Laravel
Requires
- php: ^7.1
- laravel/framework: 5.1.*|5.2.*|5.3.*|5.4.*|5.5.*|5.6.*
Requires (Dev)
- larapack/dd: ^1.0
- orchestra/testbench: ^3.6
- phpunit/phpunit: ^7.0
README
Installation
You can install the package via composer:
composer require witify/laravel-cart
Usage
For Laravel 5.1 to 5.4, add the service provider:
LaravelCartServiceProvider::class
Configuration
To save cart into the database so you can retrieve it later, the package needs to know which database connection to use and what the name of the table is.
By default the package will use the default database connection and use a table named carts
.
If you want to change these options, you'll have to publish the config
file.
php artisan vendor:publish --provider="Witify\LaravelCart\LaravelCartServiceProvider" --tag="config"
This will give you a cart.php
config file in which you can make the changes.
To make your life easy, the package also includes a ready to use migration
which you can publish by running:
php artisan vendor:publish --provider="Witify\LaravelCart\LaravelCartServiceProvider" --tag="migrations"
This will place a carts
table's migration file into database/migrations
directory. Now all you have to do is run php artisan migrate
to migrate your database
Testing
composer test
Changelog
Please see CHANGELOG for more information what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email info@witify.io instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.