PHPackages                             andskur/laracart - 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. [Framework](/categories/framework)
4. /
5. andskur/laracart

AbandonedArchivedLibrary[Framework](/categories/framework)

andskur/laracart
================

Simple Shoping Cart for Laravel framework

110PHP

Since Jun 14Pushed 8y ago1 watchersCompare

[ Source](https://github.com/andskur/LaraCart)[ Packagist](https://packagist.org/packages/andskur/laracart)[ RSS](/packages/andskur-laracart/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

LaraCart
========

[](#laracart)

**LaraCart** is simple shoping Cart for Laravel framework

Install
-------

[](#install)

```
composer require andskur/laracart

```

### Configuration

[](#configuration)

After installing, register the `Andskur\LaraCart\LaraCartServiceProvider` in your `config/app.php` configuration file:

```
'providers' => [
    // Other service providers...

    Andskur\LaraCart\LaraCartServiceProvider::class,
],
```

Also, add the `LaraCart` facade to the `aliases` array in your `app` configuration file:

```
'LaraCart' => Andskur\LaraCart\LaraCartFacade::class,
```

### Usage

[](#usage)

### Add item to cart

[](#add-item-to-cart)

Add a new item.

**example:**

```
$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-to-cart-row)

Add sub item.

**example:**

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

### Check item in cart

[](#check-item-in-cart)

Check item.

**example:**

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

### Get all cart

[](#get-all-cart)

All cart.

**example:**

```
LaraCart::getAll();
...
```

### Get item from cart

[](#get-item-from-cart)

Get item.

**example:**

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

### Delete item from cart

[](#delete-item-from-cart)

Remove item.

**example:**

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

### Get full cart total price

[](#get-full-cart-total-price)

Full price.

**example:**

```
LaraCart::cartPrice();
...
```

### Get full cart total price with discount

[](#get-full-cart-total-price-with-discount)

**example:**

```
LaraCart::cartPriceDiscount();
...
```

License
-------

[](#license)

LaraCart is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT)

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/18e935b1ab5af4987d509b498d784011f3c3407bfc0d4ff73a2b2ec95d136646?d=identicon)[andskur](/maintainers/andskur)

---

Top Contributors

[![andskur](https://avatars.githubusercontent.com/u/12956641?v=4)](https://github.com/andskur "andskur (12 commits)")

### Embed Badge

![Health badge](/badges/andskur-laracart/health.svg)

```
[![Health](https://phpackages.com/badges/andskur-laracart/health.svg)](https://phpackages.com/packages/andskur-laracart)
```

###  Alternatives

[laravel/telescope

An elegant debug assistant for the Laravel framework.

5.2k67.8M192](/packages/laravel-telescope)[spiral/roadrunner

RoadRunner: High-performance PHP application server and process manager written in Go and powered with plugins

8.4k12.2M84](/packages/spiral-roadrunner)[nolimits4web/swiper

Most modern mobile touch slider and framework with hardware accelerated transitions

41.8k177.2k1](/packages/nolimits4web-swiper)[laravel/dusk

Laravel Dusk provides simple end-to-end testing and browser automation.

1.9k36.7M259](/packages/laravel-dusk)[laravel/prompts

Add beautiful and user-friendly forms to your command-line applications.

708181.8M596](/packages/laravel-prompts)[cakephp/chronos

A simple API extension for DateTime.

1.4k47.7M121](/packages/cakephp-chronos)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
