1. Go to this page and download the library: Download dscke/identitydocuments 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/ */
use Illuminate\Http\Request;
use Werk365\IdentityDocuments\IdentityDocument;
class ExampleController {
public function id(Request $request){
$document = new IdentityDocument($request->front, $request->back);
}
}
$mrz = $document->getMrz();
$parsed = $document->getParsedMrz();
$viz = $document->getViz();
$face = $document->getFace()
use Illuminate\Http\Request;
use Werk365\IdentityDocuments\IdentityDocument;
class ExampleController {
public function id(Request $request){
$response = IdentityDocument::all($request->front, $request->back);
return response()->json($response);
}
}
use Illuminate\Http\Request;
use Werk365\IdentityDocuments\IdentityDocument;
class ExampleController {
public function id(Request $request){
$document = new IdentityDocument($request->front, $request->back);
$document->mergeBackAndFrontImages();
$mrz = $document->getMrz();
}
}
'mergeImages' => false, // bool
use Illuminate\Http\Request;
use App\Services\TesseractService;
use Werk365\IdentityDocuments\IdentityDocument;
class ExampleController {
public function id(Request $request){
$document = new IdentityDocument($request->front, $request->back);
$document->setOcrService(TesseractService::class);
$mrz = $document->getMrz();
}
}
use Illuminate\Http\Request;
use App\Services\AmazonFdService;
use Werk365\IdentityDocuments\IdentityDocument;
class ExampleController {
public function id(Request $request){
$document = new IdentityDocument($request->front, $request->back);
$document->setFaceDetectionService(AmazonFdService::class);
$mrz = $document->getFace();
}
}