PHPackages                             mortezaa97/factors - 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. mortezaa97/factors

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

mortezaa97/factors
==================

v1.0.1(6mo ago)01MITPHPPHP ^8.2CI passing

Since Nov 6Pushed 6mo agoCompare

[ Source](https://github.com/mortezaa97/factors)[ Packagist](https://packagist.org/packages/mortezaa97/factors)[ Docs](https://github.com/mortezaa97/factors)[ RSS](/packages/mortezaa97-factors/feed)WikiDiscussions main Synced 1mo ago

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

Factors Package
===============

[](#factors-package)

[![Latest Version on Packagist](https://camo.githubusercontent.com/92e444c4cd9144a9bfc10c80393c5eb4be92f941d742ae133cd6375caedccce4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d6f7274657a616139372f666163746f72732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/mortezaa97/factors)[![Total Downloads](https://camo.githubusercontent.com/08a0afd04368cc94aa094361bf684771e6ea766c40775a1f81479677ab3305fe/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d6f7274657a616139372f666163746f72732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/mortezaa97/factors)

A comprehensive Filament plugin for managing invoices/factors and their items with support for multiple types, barcode scanning, label printing, and more.

Features
--------

[](#features)

- 🧾 **Complete Invoice Management**: Create, edit, and manage invoices with multiple types
- 📦 **Item Management**: Add products to invoices with automatic calculations
- 🔍 **Barcode Scanning**: Built-in barcode scanner for quick product addition (F1 key)
- 🏷️ **Label Printing**: Generate customizable product labels
- 📄 **Invoice Printing**: Professional invoice templates
- 🔐 **Authorization**: Built-in policies for secure access control
- 🌐 **API Ready**: RESTful API endpoints for all resources
- 🇮🇷 **Persian Support**: Full RTL and Persian language support

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

[](#installation)

### 1. Require the package via Composer

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

```
composer require mortezaa97/factors
```

### 2. Register the Plugin

[](#2-register-the-plugin)

In your `app/Providers/Filament/AdminPanelServiceProvider.php`:

```
use Mortezaa97\Factors\FactorsPlugin;

public function panel(Panel $panel): Panel
{
    return $panel
        ->plugins([
            FactorsPlugin::make(),
        ]);
}
```

### 3. Run Migrations

[](#3-run-migrations)

```
php artisan migrate
```

### 4. Clear Caches

[](#4-clear-caches)

```
php artisan config:clear
php artisan cache:clear
```

Configuration
-------------

[](#configuration)

Publish the configuration file:

```
php artisan vendor:publish --tag="factors-config"
```

Publish migrations:

```
php artisan vendor:publish --tag="factors-migrations"
```

Publish views (for label and invoice customization):

```
php artisan vendor:publish --tag="factors-views"
```

Usage
-----

[](#usage)

See [PLUGIN\_USAGE.md](PLUGIN_USAGE.md) for detailed usage instructions.

Quick Example
-------------

[](#quick-example)

```
use Mortezaa97\Factors\Models\Factor;

// Create a factor
$factor = Factor::create([
    'customer_id' => $userId,
    'type' => 1, // Sale
    'date_time' => now(),
    'total_price' => 100000,
    'created_by' => auth()->id(),
]);

// Add items
$factor->items()->create([
    'model_type' => 'App\\Models\\Product',
    'model_id' => $productId,
    'count' => 2,
    'unit_price' => 50000,
]);
```

Available Routes
----------------

[](#available-routes)

- Filament Admin Panel: Automatic resource registration
- API: `/api/factors`, `/api/factor-items`
- Print: `/factors/{id}/labels`, `/factors/{id}/invoice`

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

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

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [mortezaa97](https://github.com/mortezaa97)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance73

Regular maintenance activity

Popularity1

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity48

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

Every ~0 days

Total

2

Last Release

183d ago

PHP version history (2 changes)v1.0.0PHP ^7.4|^8.0

v1.0.1PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/eb4593fe9950cffcc4459b71bbd4aa5f378c28c8e546dffb8981898f31ed8b26?d=identicon)[mortezajafari76](/maintainers/mortezajafari76)

---

Top Contributors

[![mortezaa97](https://avatars.githubusercontent.com/u/57325086?v=4)](https://github.com/mortezaa97 "mortezaa97 (2 commits)")

---

Tags

mortezaa97factors

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/mortezaa97-factors/health.svg)

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

###  Alternatives

[illuminate/events

The Illuminate Events package.

13454.3M1.7k](/packages/illuminate-events)[psalm/plugin-laravel

Psalm plugin for Laravel

3274.9M308](/packages/psalm-plugin-laravel)[illuminate/broadcasting

The Illuminate Broadcasting package.

7126.5M177](/packages/illuminate-broadcasting)[igorsgm/laravel-git-hooks

🪝• Efficiently manage Git hooks in Laravel projects. Enhance code quality, save time on reviews, and prevent bugs from entering your repository.

2931.7k1](/packages/igorsgm-laravel-git-hooks)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)[ralphjsmit/laravel-helpers

A package containing handy helpers for your Laravel-application.

13704.6k2](/packages/ralphjsmit-laravel-helpers)

PHPackages © 2026

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