Files
leonm bd1b4bba20
CI / 🧪 Tests Laravel (push) Successful in 2m8s
CI / 🐳 Build & Push Image (push) Successful in 31s
refactor: hardcode Bowli mobile scheme
2026-08-11 16:20:27 +02:00

22 lines
483 B
PHP

<?php
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, '/'));
$queryString = http_build_query($query, '', '&', PHP_QUERY_RFC3986);
return $queryString === ''
? $url
: "{$url}?{$queryString}";
}
}