feat(shoraka): defer gadai persistence until commodity confirmation and add simulation support

This commit is contained in:
2026-10-19 13:07:10 +08:00
parent 63d8c23785
commit 011fbfe8b2
18 changed files with 437 additions and 59 deletions
+2 -2
View File
@@ -2,13 +2,13 @@
if (!function_exists('api_url_for_browser')) {
/**
* Base URL for JavaScript in the browser, derived from API_URL (config api.url).
* Base URL for JavaScript, using API_BROWSER_URL when configured.
* Docker dev often uses host.docker.internal for PHP→host; browsers may not resolve it.
* Same host-mapped port is reachable at 127.0.0.1. Production URLs are unchanged.
*/
function api_url_for_browser(): string
{
$url = rtrim((string) config('api.url'), '/');
$url = rtrim((string) (config('api.browser_url') ?: config('api.url')), '/');
return str_ireplace('host.docker.internal', '127.0.0.1', $url);
}