startOfMonth()->timestamp; $records = StatUser::query() ->where('user_id', $request->user()->id) ->where('record_at', '>=', $startDate) ->orderBy('record_at', 'DESC') ->get(); $data = TrafficLogResource::collection(collect($records)); return $this->success($data); } }