PHPackages                             lyignore/discern - 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. lyignore/discern

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

lyignore/discern
================

A service that identifies the key information of the invoice

0.0.3(7y ago)011MITPHP

Since Feb 22Pushed 7y agoCompare

[ Source](https://github.com/LYignore/discern)[ Packagist](https://packagist.org/packages/lyignore/discern)[ RSS](/packages/lyignore-discern/feed)WikiDiscussions master Synced 2d ago

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

 discern
=========

[](#-discern-)

 A service that identifies the key information of the invoice.

环境需求
----

[](#环境需求)

- PHP &gt;= 5.6

安装
--

[](#安装)

```
$ composer require "lyignore/discern"
```

使用
--

[](#使用)

```
use Lyignore\Discern\Invoice;

$config = [
    // HTTP 请求的超时时间（秒）
    'timeout' => 5.0,

    // 认证发送配置
    'default' => [
        'appid'  => 'dmeUqS4+M3aH1A5u+v1eogB3d69PwTKN',
        'secret' => 'LoDPHC83A5tRlcn/wnlwmEgEnSuBeC4U'
    ],
    // 主域名配置
    'host_url' => [
        //是否正式上线
        'online' => false,
        //非稳定测试yuming
        'beta_url' => 'http://192.168.2.177:8844',
        //正式计费域名
        'lts_url'=> 'http://tmpl.aikaka.com.cn'
    ],
];

$invoice = new Invoice($config);
//上传图片
$img = $invoice->uploadInvoice('https://download.aikaka.com.cn/f0328e346f521339086089b73141839f', 'TAXI');
var_dump($img);

//获取图片详情
$imgId = $img['data']['md5'];
$imgInfo = $invoice->getInvoice($imgId);
var_dump($imgInfo);

//按时间获取上传的发票列表
$imgList = $invoice->getList('1550703352', '1550733352', 'taxi');
var_dump($imgList);

//批量导出发票信息
$invoiceExcel = $invoice->exportInovices('1550703352', '1550733352', 'taxi', 'excelname');
```

License
-------

[](#license)

MIT

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity53

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 ~3 days

Total

3

Last Release

2679d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/27730851?v=4)[lyignore](/maintainers/lyignore)[@LYignore](https://github.com/LYignore)

---

Top Contributors

[![LYignore](https://avatars.githubusercontent.com/u/27730851?v=4)](https://github.com/LYignore "LYignore (7 commits)")

### Embed Badge

![Health badge](/badges/lyignore-discern/health.svg)

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

###  Alternatives

[craftcms/cms

Craft CMS

3.6k3.6M2.9k](/packages/craftcms-cms)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

751284.3k37](/packages/civicrm-civicrm-core)[solspace/craft-freeform

The most flexible and user-friendly form building plugin!

53675.5k17](/packages/solspace-craft-freeform)[pimcore/data-importer

Adds a comprehensive import functionality to Pimcore Datahub

46823.2k3](/packages/pimcore-data-importer)[flarum/core

Delightfully simple forum software.

201.4M2.2k](/packages/flarum-core)[imdhemy/google-play-billing

Google Play Billing

491.4M5](/packages/imdhemy-google-play-billing)

PHPackages © 2026

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