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