PHP code example of franckitho / laravel-aws-textract

1. Go to this page and download the library: Download franckitho/laravel-aws-textract 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/ */

    

franckitho / laravel-aws-textract example snippets


return  [
    'region' => env('AWS_REGION', 'us-east-1'),
    'version' => env('AWS_TEXTRACT_VERSION', 'latest'),
    'credentials' => [
        'key' => env('AWS_ACCESS_KEY_ID'),
        'secret' => env('AWS_SECRET_ACCESS_KEY'),
    ],
];

use franckitho\Textract\AnalyseDocument;

$document = AnalyseDocument::features('LAYOUT')->file('path/to/file')->analyze();

use franckitho\Textract\AnalyseDocument;

$document = AnalyseDocument::features('LAYOUT')->s3('bucket', 'file')->analyze();

use franckitho\Textract\AnalyseDocument;

$document = AnalyseDocument::features('LAYOUT')->file('path/to/file')->withMetaData()->analyze();
bash
php artisan vendor:publish --tag="laravel-aws-textract-config"