refactor: hardcode Bowli mobile scheme
CI / 🧪 Tests Laravel (push) Successful in 2m8s
CI / 🐳 Build & Push Image (push) Successful in 31s

This commit is contained in:
2026-08-11 16:20:27 +02:00
parent 2f2bac9d3a
commit bd1b4bba20
7 changed files with 11 additions and 33 deletions
+3 -8
View File
@@ -4,23 +4,18 @@ namespace App\Services;
class MobileDeepLink
{
private const string SCHEME = 'bowli';
/**
* @param array<string, mixed> $query
*/
public static function to(string $path, array $query = []): string
{
$url = sprintf('%s://%s', self::scheme(), ltrim($path, '/'));
$url = sprintf('%s://%s', self::SCHEME, ltrim($path, '/'));
$queryString = http_build_query($query, '', '&', PHP_QUERY_RFC3986);
return $queryString === ''
? $url
: "{$url}?{$queryString}";
}
private static function scheme(): string
{
$scheme = rtrim((string) config('app.mobile_scheme', 'bowly'), ':/');
return $scheme !== '' ? $scheme : 'bowly';
}
}