Explore/ismail (#3)
Build Docker Image / build-frontend (push) Successful in 43s

Co-authored-by: ISMAIL MASSERAN <topaz@Mac.dlinkrouter.local>
Reviewed-on: #3
This commit was merged in pull request #3.
This commit is contained in:
2026-08-26 16:21:01 +08:00
parent 1f8642e230
commit 4c5c690196
114 changed files with 3100 additions and 175 deletions
+15
View File
@@ -0,0 +1,15 @@
<?php
if (!function_exists('api_url_for_browser')) {
/**
* Base URL for JavaScript in the browser, derived from API_URL (config api.url).
* 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'), '/');
return str_ireplace('host.docker.internal', '127.0.0.1', $url);
}
}