sortByDesc(function (string $string) use ($input) { similar_text($input, $string, $percentage); return $percentage; }) ->first(); } }