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