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