I have this column my database:
As you can see the time_out is null
, and when I use this query:
$checkertimeout = Attendance::where('emp_id', $request->emp_id)
->where('attend_date', $date)->get(['time_out']);
I get this output:
[{"time_out":null}]
But when I use it in an if-else statement:
if ($checkertimeout->isEmpty()) {
echo "works";
} else {
echo "wont work";
}
it display won't work. Any help is appreciated, I'm new to Eloquent query :)
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire