PHP code example of jkudish / laravel-document-extraction
1. Go to this page and download the library: Download jkudish/laravel-document-extraction 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/ */
jkudish / laravel-document-extraction example snippets
use Illuminate\Contracts\JsonSchema\JsonSchema;
$result = Extraction::fromStorage('inbox/invoice.pdf')
->instructions('Extract only facts present in the invoice.')
->schema(fn (JsonSchema $schema) => [
'invoice_number' => $schema->string()->nullable()->