PHP code example of jpcaparas / laravel-llamaparse-client

1. Go to this page and download the library: Download jpcaparas/laravel-llamaparse-client 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/ */

    

jpcaparas / laravel-llamaparse-client example snippets


$filePath = 'path/to/your/file.pdf';

$llamaparse = app('llamaparse');

$response = $llamaparse->uploadFile($filePath);
$jobId = $response['id'];

$jobStatus = $llamaparse->getJob($jobId);

$markdownResult = $llamaparse->getJobResult($jobId);
$textResult = $llamaparse->getJobTextResult($jobId);
bash
php artisan vendor:publish --provider="JPCaparas\LLamaparse\LLamaparseServiceProvider"