PHP code example of sharpapi / laravel-resume-parser
1. Go to this page and download the library: Download sharpapi/laravel-resume-parser 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/ */
sharpapi / laravel-resume-parser example snippets
namespace App\Http\Controllers;
use GuzzleHttp\Exception\GuzzleException;
use SharpAPI\ResumeParser\ResumeParserService;
class ResumeController extends Controller
{
protected ResumeParserService $resumeParserService;
public function __construct(ResumeParserService $resumeParserService)
{
$this->resumeParserService = $resumeParserService;
}
/**
* @throws GuzzleException
*/
public function parseResume()
{
$statusUrl = $this->resumeParserService->parseResume(
'/path/to/resume.pdf',
'English' // OPTIONAL output language, English is the default anyway
);
$result = $this->resumeParserService->fetchResults($statusUrl);
return response()->json($result->getResultJson());
}
}