PHPackages                             berkayk/laravel-cart - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. berkayk/laravel-cart

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

berkayk/laravel-cart
====================

Laravel shopping cart management in an easy way.

v1.2(7y ago)3101MITPHPPHP &gt;=7.0.0

Since Dec 23Pushed 7y ago1 watchersCompare

[ Source](https://github.com/berkayk/laravel-cart)[ Packagist](https://packagist.org/packages/berkayk/laravel-cart)[ RSS](/packages/berkayk-laravel-cart/feed)WikiDiscussions master Synced yesterday

READMEChangelog (3)Dependencies (4)Versions (22)Used By (0)

[![Latest Stable Version](https://camo.githubusercontent.com/22e58c6b38d758df59a4cc57a26acd2dcd3ba13edaa8208b5e586322c6467087/68747470733a2f2f706f7365722e707567782e6f72672f6265726b61796b2f6c61726176656c2d636172742f762f737461626c65)](https://packagist.org/packages/berkayk/laravel-cart)[![Total Downloads](https://camo.githubusercontent.com/85538b9ff97793a8e2779ef543ac42687350bd14d09ae0f93e6a6f086411ab32/68747470733a2f2f706f7365722e707567782e6f72672f6265726b61796b2f6c61726176656c2d636172742f646f776e6c6f616473)](https://packagist.org/packages/freshbitsweb/laravel-cart-manager)[![License](https://camo.githubusercontent.com/a775fdbd25b2595d7654d588486c329089b43410a96b766dc8736d5641ca79f4/68747470733a2f2f706f7365722e707567782e6f72672f6265726b61796b2f6c61726176656c2d636172742f6c6963656e7365)](https://packagist.org/packages/freshbitsweb/laravel-cart-manager)

Cart Manager for Laravel 5.5+
=============================

[](#cart-manager-for-laravel-55)

This package is an updated version of FreshBitsWeb's [laravel-cart-manager](https://github.com/freshbitsweb/laravel-cart-manager) package.

What's updated
--------------

[](#whats-updated)

- Each update to a cart item's quantity now dispatches `CartItemQuantityChanged` event.

Just another shopping cart package?
-----------------------------------

[](#just-another-shopping-cart-package)

There are a few well maintained shopping cart packages available but I wanted to have a solution which feels like *the Laravel way* and is more coupled with the database and provides additional functionality like **shipping charges**, **discount**, **tax**, **total**, **round off**, **guest carts**, etc. *out-of-box* while staying a very easy to use package.

Why/when to use?
----------------

[](#whywhen-to-use)

Let us decide when this package should be used:

1. You are looking for an easy to use solution which provides cart feature for users as well as guests.
2. You want to make sure that the carting can work via APIs as well to support mobile applications.
3. You want features like Shipping charges, tax, discount, round off, etc.
4. You want to store cart data in Database, session or at a custom place.
5. You like using the packages which are more like [the Laravel way](https://laravelshift.com/opinionated-laravel-way-shift)

Installation
------------

[](#installation)

1. Install the package by running this command in your terminal/cmd:

```
composer require freshbitsweb/laravel-cart-manager

```

2. Import config file by running this command in your terminal/cmd:

```
php artisan vendor:publish --tag=laravel-cart-manager-config

```

3. Import migrations files by running these commands in your terminal/cmd:

```
php artisan vendor:publish --tag=laravel-cart-manager-migrations
php artisan migrate

```

4. Add a trait to the model(s) of cart items:

```
