feat: missing

This commit is contained in:
2026-05-26 12:59:12 +02:00
parent f716a205ce
commit 835dfcc677
5 changed files with 307 additions and 1 deletions
+26
View File
@@ -0,0 +1,26 @@
<?php
namespace App\Services;
class MobileDeepLink
{
/**
* @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}";
}
private static function scheme(): string
{
$scheme = rtrim((string) config('app.mobile_scheme', 'bowly'), ':/');
return $scheme !== '' ? $scheme : 'bowly';
}
}