where('create_at','>',$startTime) ->where('create_at','<',$endTime)->count(); $androidTotal = User::where(function ($query) { $query->where('facility_1','<>', null)->where('facility_1','<>', ''); })->whereOr(function ($query) { $query->where('facility_3','<>', null)->where('facility_3','<>', ''); })->count(); $iosTotal = User::where(function ($query) { $query->where('facility_2','<>', null)->where('facility_2','<>', ''); })->whereOr(function ($query) { $query->where('facility_4','<>', null)->where('facility_4','<>', ''); })->count(); $this->usersTotal = $usersTotal; $this->activeToday = $activeToday; $this->androidTotal = $androidTotal; $this->iosTotal = $iosTotal; $this->fetch(); } }