PHPackages                             sectheater/marketplace - 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. sectheater/marketplace

ActiveLibrary

sectheater/marketplace
======================

The Fluent Laravel E-commerce system

v1.0.2(7y ago)206655↓100%54MITPHP

Since Oct 15Pushed 7y ago13 watchersCompare

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

READMEChangelog (2)DependenciesVersions (4)Used By (0)

[![Latest Version on Packagist](https://camo.githubusercontent.com/5ee39ff996492629c2fd210be3e57721ac26edbc4124cd8d979e115ff0332f93/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f736563746865617465722f6d61726b6574706c6163652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/sectheater/marketplace)[![MadeWithLaravel.com shield](https://camo.githubusercontent.com/4c34a261d64e54fe9c2b54f129d571e6aab04384c5187bc90629e13aeb535374/68747470733a2f2f6d616465776974686c61726176656c2e636f6d2f73746f726167652f7265706f2d736869656c64732f313136312d736869656c642e737667)](https://madewithlaravel.com/p/marketplace/shield-link)

> the marketplace CheatSheet will be availble soon

---

marketplace provides you the following :
----------------------------------------

[](#marketplace-provides-you-the-following-)

### 1. Product &amp; Product Variation System

[](#1-product--product-variation-system)

Create simple products, and complex ones using variation system by attaching the product to a specific type.

### 2. Coupon System

[](#2-coupon-system)

Generate , Validate , and purchase them while checkout easily.

### 3. Wishlist / Cart System

[](#3-wishlist--cart-system)

- CRUD the wishlist/cart easily
- get the total/subtotal of the whole cart/wishlist and optionally after sale/coupons applied.
- stock handling behind the scenes .

### 4. Category System

[](#4-category-system)

- Attach product, type of products to a category.

### 5. Sale System

[](#5-sale-system)

- Setup sale for category, specific product, type of products.

### 6. Authorizing Users &amp; Managing Roles.

[](#6-authorizing-users--managing-roles)

Installation Steps
------------------

[](#installation-steps)

### 1. Require the Package

[](#1-require-the-package)

After creating your new Laravel application you can include the marketplace package with the following command:

```
composer require sectheater/marketplace:dev-master
```

### 2. Add the DB Credentials &amp; APP\_URL

[](#2-add-the-db-credentials--app_url)

Next make sure to create a new database and add your database credentials to your .env file:

```
DB_HOST=localhost
DB_DATABASE=homestead
DB_USERNAME=homestead
DB_PASSWORD=secret

```

You will also want to update your website URL inside of the `APP_URL` variable inside the .env file:

```
APP_URL=http://localhost:8000

```

### 3. Getting Your Environment Ready.

[](#3-getting-your-environment-ready)

#### Just Run The following command.

[](#just-run-the-following-command)

```
 php artisan sectheater-market:install

```

##### Command Interpretation

[](#command-interpretation)

- The command just publishes the marketplace's config, migrations,helpers and seeder.

Notice : You may need to run the autoload composer command to reload the changes.

```
 composer dump-autoload -o

```

Another Notice : Don't forget to delete the default users table migration, as marketplace ships with a default one as well.

### 4. Sample Usage

[](#4-sample-usage)

##### 4.1 Creating a Product with Variation.

[](#41-creating-a-product-with-variation)

```
Product::generate([
  'user_id' => auth()->id(),
  'name' => 'laptop',
  'description' => 'Fancy laptop',
  'price' => 15000,
  'category' => 'electronics',
  'type' => ['name' => 'MacBook Pro', 'stock' => 20],
  'details' => ['color' => 'Silver', 'dummy-feature' => 'dummy-text']
);
```

##### 4.2 Filter products by criteria.

[](#42-filter-products-by-criteria)

```
Product::fetchByVariations(['locations' => 'U.K', 'variations' => ['size' => 'XL', 'color' => 'red'], 'categories' => 'clothes']);
```

- Add custom Criterion and use it while searching.

##### 4.3 get Cart total/subtotal.

[](#43-get-cart-totalsubtotal)

Out of the blue, you may use a couple of methods to retrieve the total/subtotal

```
Cart::subtotal();
Cart::total(); // returns total after applying tax.
Cart::total($coupons); // Collection of coupons passed, returns total after applying tax and coupons.
Cart::subtotalAfterCoupon($coupons);
```

Suprisingly every single method you can use for a cart, you can use for a wishlist ( since we can consider it as a virtual cart )

##### 4.4 get Cart item .

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

```
Cart::item(1); // get the item with id of 1

Cart::item(1,  ['color' => 'blue', 'size' => 'L']); // get the item with the id of 1 and should have these attributes.

Cart::item(null, ['color' => 'blue','size' => 'L']); // get the current authenticated user's cart which has these attributes assuming that these attributes identical to the database record.

Cart::item(null, ['color' => 'blue','size' => 'L'] , 'or');  // get the current authenticated user's cart which has any of these attributes.
```

##### 4.4 Generate Coupons.

[](#44-generate-coupons)

```
Coupon::generate([
  'user_id' => auth()->id(),
  'active' => true,
  'percentage' => 10.5,
  'expires_at' => Carbon::now()->addWeeks(3)->format('Y-m-d H:i:s')
]);
```

##### 4.5 Validate Coupons.

[](#45-validate-coupons)

```
$coupon = Coupon::first(); // valid one
Coupon::validate($coupon); // returns true
```

##### 4.6 Deactivate Coupons.

[](#46-deactivate-coupons)

```
$coupon = Coupon::first();
Coupon::deactivate($coupon->id);
```

##### 4.7 Purchas Coupons.

[](#47-purchas-coupons)

```
$coupon = Coupon::first();
Coupon::purchase($coupon); // Purchase the coupon for the current authenticated user.
Coupon::purchase($coupon, $anotherUser); // Purchase the coupon for the passed user.
```

##### 4.7 Purchased Coupons.

[](#47-purchased-coupons)

- It releases the invalid purchased coupons automatically.

```
Coupon::purchased(); // returns the only valid purchased coupons.
```

##### 4.8 Apply Specific Coupons.

[](#48-apply--specific-coupons)

- Assuming the user has a couple of coupons, he can designate which of them that can be applied on a specific product.

```
Coupon::appliedCoupons($coupons); // returns a query builder.
```

For more, you can view the [docs](https://github.com/SecTheater/marketplace/wiki).

###  Health Score

36

—

LowBetter than 81% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity34

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity63

Established project with proven stability

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.

###  Release Activity

Cadence

Every ~2 days

Total

3

Last Release

2759d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1d2dd233c9a0eba9b86887b347c4ff4d7f016c06cafac266c2a8dd72da1aaa78?d=identicon)[SecTheater](/maintainers/SecTheater)

---

Tags

laravel-ecommercelaravel-marketplacemarketplaceshopping-cartlaravel e-commerceLaravel shopping cart

### Embed Badge

![Health badge](/badges/sectheater-marketplace/health.svg)

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

###  Alternatives

[binafy/laravel-cart

Laravel Cart is a customizable package for adding shopping cart functionality to Laravel applications

40445.9k](/packages/binafy-laravel-cart)[anam/phpcart

Simple framework agnostic shopping cart

12115.4k](/packages/anam-phpcart)

PHPackages © 2026

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