PHPackages                             rabsana/normalizer - 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. rabsana/normalizer

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

rabsana/normalizer
==================

Normalize values based on predefined normalizing table

v2.0.0(2y ago)011proprietaryPHP

Since Aug 31Pushed 2y agoCompare

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

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

Rabsana normalizer - rabsana/normalizer
---------------------------------------

[](#rabsana-normalizer---rabsananormalizer)

**rabsana/normalizer** normalizes values, amounts, prices based on predefined list of ratios.

### Installation

[](#installation)

Add following code to your project composer.json file(ensure token not expired):

```
{
  "repositories": [
        {
          "type": "vcs",
          "url": "https://gitlab+deploy-token-totalexcoin:W3tDVLHJxg4uNtEsjtWi@repo.rabsana.ir/packages/normalizer.git"
        }
    ]
}
```

Install via [composer](http://getcomposer.org) in the root directory of a Laravel 5 application

```
composer require rabsana/normalizer:dev-master

```

Add the following line to `config/app.php` inside the 'providers' array to use the service provider

```
'Rabsana\Normalizer\ServiceProvider',

```

Update composer

```
composer update

```

Run the package install command

```
php artisan vendor:publish

```

### Usage

[](#usage)

For accessing normalization features you only need to add `NormalizerTrait` to your model:

```
use Rabsana\Normalizer\Traits\NormalizerTrait;

class YourModelName extends Model{
    use NormalizerTrait;
}
```

This trait adds following methods to the model:

- **normalizers()** Which is a morphMany relationship to `Rabsana\Normalizer\Models\Normalizer::class` class.
- **normalize()** This method will normalize given column using value based on normalizing table.

### Overview

[](#overview)

#### $normalizations

[](#normalizations)

this property should be presents in models in order to normalizations can work.

```
public static $normalizations = [
    'column' => 'representedName',
];
```

### Configs

[](#configs)

After publishing configs there will be a `rabsana-normalizer.php` file in `config/` folder

```
return [
    // These middlewares will be applied to all actions of controllers
    'middlewares' => [
        'web',
        'auth'
    ],

    'views' => [
        'master-layout' => 'rabsana-normalizer::layouts.master',
        'content-section' => 'content',
        'scripts-stack' => 'scripts',
        'styles-stack' => 'styles',
    ],

    // Represents classes that use NormalizerTrait
    'templates' => [
        [
            'class' => 'Rabsana\Normalizer\Tests\Models\Foo',
            'name' => 'localized name'
        ]
    ],
];
```

- You have to add middleware for restricting access to specific group of uses(e.g admins)
- You should specify master layout and main section of page. Also you should specify styles and scripts stacks
- Each class tha you want to be used in normalizations, you must add them in `templates` section.

### Tools

[](#tools)

composer, phpunit, orchestra/testbench

### License

[](#license)

This packaged licensed to

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community6

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

991d ago

### Community

Maintainers

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

---

Top Contributors

[![sajjadsisakhti](https://avatars.githubusercontent.com/u/46242002?v=4)](https://github.com/sajjadsisakhti "sajjadsisakhti (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/rabsana-normalizer/health.svg)

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

###  Alternatives

[aedart/athenaeum

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

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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