public function activities(BlogCategory $id, SearchUserActivity $request): JsonResource 	{ 		$type = $request->type;  		return UserActivityResource::collection($id->activities() 			->includes() 			->when($type, function (object $query) use ($type): void { 				$query->where('type', $type); 			}) 			->search($request->search) 			->latest() 			->paginate() 			->withQueryString()); 	}