public function scopeSearch(Builder $query, ?string $search = null): Builder 	{ 		$search = preg_replace('/\s+/', '%', $search ?? ''); 		$search = empty($search) ? null : '%' . $search . '%';  		return !$search ? $query : $query->where(function (Builder $query) use ($search): void { 			$query->orWhere('id', 'like', $search) 				->orWhere('vat_number', 'like', $search); 		})->orWhere(function (Builder $query) use ($search) { 			$query->whereHas('authParent', function (Builder $query) use ($search) { 				$query->where('name', 'like', $search) 				->orWhere('email', 'like', $search); 			}); 		}); 	}