PHP code example of godruoyi / laravel-ocr

1. Go to this page and download the library: Download godruoyi/laravel-ocr library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

godruoyi / laravel-ocr example snippets


// config/app.php

'OCR' => Godruoyi\LaravelOCR\OCR::class,

use OCR;

// 身份证识别
OCR::baidu()->idcard($filePath);
shell
php artisan vendor:publish --provider="Godruoyi\LaravelOCR\OCRServiceProvider"