ke shun chen/baiduocr

百度OCR API在Laravel中的应用

v1.1 2019-04-03 10:08 UTC

This package is not auto-updated.

Last update: 2024-09-26 16:37:48 UTC


README

百度文字识别API在Laravel5中的简单封装,具体API使用详情参见百度文字识别API

安装

直接在composer.json中添加"keshunchen/baiduocr": "~1.0" 或者直接composer require "keshunchen/baiduocr"

对于 laravel5

1. 安装此插件

2. 在config/app.php文件内添加

    'providers' => [
        Keshunchen\Baiduocr\BaiduocrServiceProvider::class,
    ],
    
    'aliases' => [
        'Baiduocr' => Keshunchen\Baiduocr\BaiduocrFacade::class,
    ],

3. 配置文件

    php artisan vendor:publish

修改config/baiduocr.php配置百度API参数

4. 使用

    \Baiduocr::idcard($image, $isFront, $options);

许可证

MIT