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 ($query) use ($search): void { 			$query->orWhere('name', 'like', $search)->orWhere('email', 'like', $search); 		}); 	}