user(); $logs = ProductViewLog::with(['sku']) ->has('sku') ->where('user_id', $user->id) ->latest('updated_at') ->simplePaginate(Paginator::resolvePerPage('per_page', 20, 50)); return ProductViewLogResource::collection($logs); } }