This commit is contained in:
salam committed 2026-09-26 18:22:30 +02:00
1 parent 8325f3a334
commit 5188d1f171
2 files changed
+9 -61

No files matched your search

+9
View File
@@ -384,4 +384,13 @@ trait GrappingHelper
return $results;
}
protected function clean_string(string $string)
{
$string = str_replace(' ', '-', $string); // Replaces all spaces with hyphens.
$string = preg_replace('/[^A-Za-z0-9\-]/', '', $string); // Removes special chars.
$string = strtolower($string);
return preg_replace('/-+/', '-', $string); // Replaces multiple hyphens with single one.
}
}