PHPackages                             rohith016/e-commerce-stock-models - 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. rohith016/e-commerce-stock-models

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

rohith016/e-commerce-stock-models
=================================

e-commerce package for stock management and stock allocation

v1.0.0(1y ago)14MITPHPPHP ^7.4|^8.0

Since Nov 2Pushed 1y ago1 watchersCompare

[ Source](https://github.com/rohith016/e-commerce-stock-models)[ Packagist](https://packagist.org/packages/rohith016/e-commerce-stock-models)[ RSS](/packages/rohith016-e-commerce-stock-models/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

E-commerce Package
==================

[](#e-commerce-package)

A reusable Laravel package providing models, migrations, seeders, and factories for e-commerce applications. This package simplifies setup and accelerates development for common e-commerce functionality.

Features
--------

[](#features)

Predefined Eloquent models for Product, Order, Address, and more. Migration files to create necessary database tables. Seeders and factories to populate tables with dummy data for testing and development.

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

[](#installation)

### Step 1: Require the Package

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

Install the package via Composer:

```
composer require rohith016/e-commerce-stock-models

composer require rohith016/e-commerce-stock-models:dev-main --dev

composer require rohith016/e-commerce-stock-models:^1.0
```

### Step 2: Publish Resources

[](#step-2-publish-resources)

The package provides a range of resources (models, migrations, seeders, and factories). You can selectively publish resources using tags.

### Step 3: Publish the Service Provider

[](#step-3-publish-the-service-provider)

After requiring the package, Laravel should automatically discover the service provider. If not, register it in config/app.php:

```
'providers' => [
    // Other Service Providers
    Rohith\EcommercePackage\EcommerceServiceProvider::class,
];
```

Usage
-----

[](#usage)

The package resources can be published to your Laravel application’s default structure as needed.

Publish All Resources
---------------------

[](#publish-all-resources)

To publish all available resources (models, migrations, seeders, and factories), run:

```
php artisan vendor:publish --provider="Rohith\EcommercePackage\EcommerceServiceProvider"
```

Selective Publishing
--------------------

[](#selective-publishing)

Use the following commands to publish specific resources:

Publish Models:

```
php artisan vendor:publish --tag=ecommerce-models
```

Publish Migrations:

```
php artisan vendor:publish --tag=ecommerce-migrations
```

Publish Seeders:

```
php artisan vendor:publish --tag=ecommerce-seeders
```

Publish Factories:

```
php artisan vendor:publish --tag=ecommerce-factories
```

Example Models and Structure
----------------------------

[](#example-models-and-structure)

Once published, you can find the models in app/Models, migrations in database/migrations, seeders in database/seeders, and factories in database/factories.

Running Migrations and Seeders
------------------------------

[](#running-migrations-and-seeders)

### Migrate the Database:

[](#migrate-the-database)

Run the migrations to create the e-commerce tables:

php artisan migrate Seed the Database (optional):

Seed the database tables with sample data:

```
php artisan db:seed --class=ProductSeeder
```

Example Here’s how to use the Product model:

```
use App\Models\Product;

// Retrieve all products
$products = Product::all();

// Create a new product
$product = Product::create([
    'name' => 'Sample Product',
    'description' => 'This is a sample product description.',
    'price' => 19.99,
    'stock' => 50,
]);
```

Contributing
------------

[](#contributing)

Contributions are welcome! Feel free to submit a pull request or open an issue for suggestions and improvements.

License
-------

[](#license)

This package is open-source software licensed under the MIT license.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance38

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity43

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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

554d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3d6ada8a43b494d61f858f087e95f55016bf03ee95e4828b19eacb70deb78ba2?d=identicon)[rohith612](/maintainers/rohith612)

---

Top Contributors

[![rohith016](https://avatars.githubusercontent.com/u/103015707?v=4)](https://github.com/rohith016 "rohith016 (16 commits)")

### Embed Badge

![Health badge](/badges/rohith016-e-commerce-stock-models/health.svg)

```
[![Health](https://phpackages.com/badges/rohith016-e-commerce-stock-models/health.svg)](https://phpackages.com/packages/rohith016-e-commerce-stock-models)
```

PHPackages © 2026

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