PHPackages                             sturt/salary - 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. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. sturt/salary

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

sturt/salary
============

Parse salary slip in images, get the salary amount

v1.0.0(7y ago)08MITHTMLPHP &gt;=7.0

Since Dec 16Pushed 7y ago1 watchersCompare

[ Source](https://github.com/Sturtuk/Salary)[ Packagist](https://packagist.org/packages/sturt/salary)[ RSS](/packages/sturt-salary/feed)WikiDiscussions master Synced 2mo ago

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

Tesseract OCR for PHP
=====================

[](#tesseract-ocr-for-php)

#### Extract Salary real number from image format salary Slip

[](#extract-salary-real-number-from-image-format-salary-slip)

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

[](#installation)

Scraper requires [PHP](https://php.net) 7.1 or 7.2. This particular version supports Laravel 5.5 or 5.6 only.

To get the latest version, simply require the project using [Composer](https://getcomposer.org):

Via Composer

```
$ composer require sturt/salary
```

Once installed, if you are not using automatic package discovery, then you need to register the `sturt\salary\SalaryServiceProvider::class,` service provider in your `config/app.php`.

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

[](#configuration)

Scraper supports optional configuration.

To get started, you'll need to publish all vendor assets:

```
$ php artisan vendor:publish
```

This will create a `config/sa.php` file in your app that you can modify to set your configuration. Also, make sure you check for changes to the original config file in this package between releases.

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

[](#configuration-1)

Open sa.php from Config

```
return [
    // add more patterns if needed
    'patterns'      =>  [
        'net pay',
        'et pay',
        'net payable',
        'gross pay',
        'total pay',
        'net pay',
    ],

    // Image file stored path

    'FILE_PATH'     =>   base_path() ."/public/uploads/",

    //Change Route ULR

    'ROUTE_NAME'    =>  'upload_salary_slip',

    // Change Language - More language coming soon
    'OCR_LANG'      =>  'eng',

];

```

Usage
-----

[](#usage)

```
get request to /upload_salary_slip/file.jpg located in public/uploads/

```

Output
------

[](#output)

Success

```
{"status":200,"salary":"35,430.00"}

```

File not found

```
{"status":204,"file_not_found":"\/public\/file Not found"}

```

### [![](https://camo.githubusercontent.com/f5fed26ca0c8c275667fbe84fa98faf3f710373086ec9f199622fbd6bc9039e6/68747470733a2f2f74686961676f616c657373696f2e616d73332e6469676974616c6f6365616e7370616365732e636f6d2f77696e646f77732d31382e737667)](https://camo.githubusercontent.com/f5fed26ca0c8c275667fbe84fa98faf3f710373086ec9f199622fbd6bc9039e6/68747470733a2f2f74686961676f616c657373696f2e616d73332e6469676974616c6f6365616e7370616365732e636f6d2f77696e646f77732d31382e737667) Note for Windows users

[](#-note-for-windows-users)

There are [many ways](https://github.com/tesseract-ocr/tesseract/wiki#windows) to install [Tesseract OCR](https://github.com/tesseract-ocr/tesseract) on your system, but if you just want something quick to get up and running, I recommend installing the [Capture2Text](https://chocolatey.org/packages/capture2text) package with [Chocolatey](https://chocolatey.org).

```
choco install capture2text --version 3.9

```

⚠️ Recent versions of [Capture2Text](https://chocolatey.org/packages/capture2text) stopped shipping the `tesseract` binary.

### [![](https://camo.githubusercontent.com/62b2f34e29ee3c547049959dcd45744c00dea18dfd0c03acd79bd1c168662eb5/68747470733a2f2f74686961676f616c657373696f2e616d73332e6469676974616c6f6365616e7370616365732e636f6d2f6170706c652d31382e737667)](https://camo.githubusercontent.com/62b2f34e29ee3c547049959dcd45744c00dea18dfd0c03acd79bd1c168662eb5/68747470733a2f2f74686961676f616c657373696f2e616d73332e6469676974616c6f6365616e7370616365732e636f6d2f6170706c652d31382e737667) Note for macOS users

[](#-note-for-macos-users)

With [MacPorts](https://www.macports.org) you can install support for individual languages, like so:

```
$ sudo port install tesseract-

```

But that is not possible with [Homebrew](https://brew.sh). It comes only with **English** support by default, so if you intend to use it for other language, the quickest solution is to install them all:

```
$ brew install tesseract --with-all-languages

```

License
-------

[](#license)

tesseract-ocr-for-php is released under the [MIT License](https://github.com/Sturtuk/salary/blob/master/MIT-LICENSE).

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity56

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

2707d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9cf40ad534ebf5a9a3c62bcf6be69a18d37b432c6a05e9a65667a5284215f57f?d=identicon)[Sturtuk](/maintainers/Sturtuk)

---

Top Contributors

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

---

Tags

laravelpay slip extractpay slipssalary slipsocr tools

### Embed Badge

![Health badge](/badges/sturt-salary/health.svg)

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

###  Alternatives

[ajthinking/archetype

Programmatically edit PHP and Laravel files.

2723.4M12](/packages/ajthinking-archetype)[json-mapper/laravel-package

The JsonMapper package for Laravel

25170.4k3](/packages/json-mapper-laravel-package)

PHPackages © 2026

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