PHP code example of mhtutorials / dpfp4500ws
1. Go to this page and download the library: Download mhtutorials/dpfp4500ws 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/ */
mhtutorials / dpfp4500ws example snippets
php artisan install:api
php artisan key:generate
php artisan ui:auth
php artisan vendor:publish --tag=mhtutorials-dpfp4500ws-p
return [
'mhdpfp' => [
'key' => env('PLUGIN_BIOMETRIC_KEY'),
],
];
PLUGIN_BIOMETRIC_KEY="tu clave aqui"
use App\Http\Controllers\DpfpApi\UserRestApiController;
//SensorRestApi
Route::post("list_finger", [UserRestApiController::class, "index"]);
Route::post("save_finger", [UserRestApiController::class, "store"]);
Route::post("sincronizar", [UserRestApiController::class, "sincronizar"]);
use App\Http\Controllers\DpfpApi\UserRestApiController;
//Rutas para interactuar con el plugin
Route::get('/users', [UserRestApiController::class, 'users_list'])->name('dpfp.index');
Route::get('/users/verify_users', [UserRestApiController::class, 'verify_users'])->name('verify_users');
Route::get('/users/getdata_users/{user_id}/{fingerId}', [UserRestApiController::class, 'getDataUser'])->name('getdata_users');
Route::get("/users/{user}/finger-list", [UserRestApiController::class, "fingerList"])->name("finger-list");
php artisan migrate
//Relacion uno a muchos
public function fingerprints() {
return $this->hasMany("App\Models\DpfpModels\FingerPrint");
}
php artisan storage:link