mardi 8 février 2022

How to show only if an active employee not clocks in?

I am saving a employee as status = 'Active', so when an status having Active Employee clocks in for current day than i am writing a query to show who have not clocked in for current working day. But when an active employee clocks in still his name remains in Not clocked in dashboard. I am new to Laravel. Can anyone help me out yrr. Thanks in advance. Note if an employee status is Ex-Employee than don't show.


 

  $notClockIn    = AttendanceEmployee::where('date', '=', $currentDate)->get()->pluck('employee_id');
    
               
               

 $notClockIns    = Employee::where('created_by', '=', \Auth::user()->creatorId())
                ->whereRaw('status = "Active" or status =""')
                ->whereNotIn('id',$notClockIn)->get();



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire