I have 3 zktecho devices k40 series, i have register user on one at particular device and enroll the finger of such user then i acquire such fingers against this specific user and save it in mysql database as binary format(longblob) with finger index number, now i want this user and finger template to set on other zktecho k40 device, in this given library code, this is not setting finger template and there no exception through, Pls anyone assist me i'm using such Library (https://github.com/raihanafroz/zkteco) or tells me, in this library, is this creating a correct command_string for setting finger template.
$db = UserFingerTemplate::where('uid',$uid)->get();
$finger = array();
foreach($db as $dt){
$i = $dt->index;
$finger[$i] = $dt->template;
$data['uid'] = $dt->uid;
}
$data['finger'] = $zk->setFingerprint($uid,$finger);
$data['indb'] = $db;
$zk->disconnect();
dd($data);
library finger setting code
static public function set(ZKTeco $self, $uid, array $data)
{
$self->_section = __METHOD__;
$count = 0;
foreach ($data as $finger => $item) {
//dd($item);
$allowSet = true;
$fingerPrint = new Fingerprint();
$chkFinger = $fingerPrint->_checkFinger($self, $uid, $finger);
if ($chkFinger === true) {
$allowSet = $fingerPrint->_removeFinger($self, $uid, $finger);
}
dd($fingerPrint->_setFinger($self, $item));
if ($allowSet === true && $fingerPrint->_setFinger($self, $item) === true) {
$count++;
}
}
return $count;
}
/**
* @param ZKTeco $self
* @param string $data Binary fingerprint data item
* @return bool|mixed
*/
private function _setFinger(ZKTeco $self, $data)
{
$command = Util::CMD_USER_TEMP_WRQ;
$command_string = $data;
return $self->_command($command, $command_string);
}