Open Anish-Nectar opened 2 years ago
It doesn’t take arguments fetch all data then handle it by yourself
Good morning Sir,I'm trying to make a project with my ZKTeco device and Laravel,But I have a problem, I don't know how to synchronize automatically the device to my database, so I would like to ask you to help me please 🙏,Obtenir Outlook pour Android
Download the zkteco lib package and use it’s built in function setUser
I'm using this package, my application is connected with the device,But I want to connect the device to my database, with use the application,Obtenir Outlook pour Android
I'm using the application to get data from the device and insert in my database Obtenir Outlook pour Android
Use getUser() it gives u array of people inserted in the device
You can use this : $zk = new ZKTeco('ip'); $zk->connect(); $zk->enableDevice(); $zk->getUser(); $tody = collect($zk->getAttendance())->whereBetween('timestamp', [Carbon::parse(now())->startOfDay(), Carbon::parse(now())->endOfDay()]);
and also for best performance cache this $zk->getAttendance()
@Almandeel your code very slow load all data in app then filtered it. what you do if have more than 50000 records ?
I cant add filter like (pagination , today attendances) in getAttendance and getUser function. It takes lot of time to get fetch thousands of data from server