React/Vite Frontend (hifi-src) + PHP/MariaDB Backend (hifi/api) fuer den Car-Hifi Umbau-Shop HifiPlanet in Amorbach, inkl. Admin-Panel, 2FA, Wartungsmodus, Cookie-Consent und rechtlichen Pflichtseiten. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
18 lines
424 B
PHP
18 lines
424 B
PHP
<?php
|
|
|
|
namespace App\Support;
|
|
|
|
class Slug
|
|
{
|
|
public static function make(string $text): string
|
|
{
|
|
$map = [
|
|
'ä' => 'ae', 'ö' => 'oe', 'ü' => 'ue', 'ß' => 'ss',
|
|
'Ä' => 'ae', 'Ö' => 'oe', 'Ü' => 'ue',
|
|
];
|
|
$text = strtr($text, $map);
|
|
$text = strtolower($text);
|
|
$text = preg_replace('/[^a-z0-9]+/', '-', $text);
|
|
return trim($text, '-');
|
|
}
|
|
}
|