mirror of
https://github.com/HolgerHatGarKeineNode/einundzwanzig-app.git
synced 2025-12-14 12:06:46 +00:00
14 lines
403 B
PHP
14 lines
403 B
PHP
<?php
|
|
|
|
if (!function_exists('route_with_country')) {
|
|
function route_with_country(string $name, array $parameters = [], bool $absolute = true): string
|
|
{
|
|
if (!isset($parameters['country'])) {
|
|
$country = request()->route('country') ?? 'de';
|
|
$parameters = ['country' => $country] + $parameters;
|
|
}
|
|
|
|
return route($name, $parameters, $absolute);
|
|
}
|
|
}
|