mirror of
https://github.com/HolgerHatGarKeineNode/einundzwanzig-app.git
synced 2025-12-14 12:06:46 +00:00
🚀 initial commit
This commit is contained in:
13
app/helpers.php
Normal file
13
app/helpers.php
Normal file
@@ -0,0 +1,13 @@
|
||||
<?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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user