add all controllers logic

This commit is contained in:
root
2026-03-11 17:53:15 -04:00
parent 3e6c577085
commit 2ef71cc92b
421 changed files with 12009 additions and 5211 deletions
+12
View File
@@ -20,6 +20,18 @@ class TimeService
return (string) (config('app.timezone') ?: 'UTC');
}
public function primeFromRequest($request): void
{
$headerTz = (string) ($request?->header('X-Timezone') ?? '');
if ($headerTz === '') {
$headerTz = (string) ($request?->header('Time-Zone') ?? '');
}
if ($headerTz !== '' && in_array($headerTz, \DateTimeZone::listIdentifiers(), true)) {
// No session-backed storage; header is read per request if needed.
}
}
public function serverTimezone(): string
{
return (string) (config('app.timezone') ?: 'UTC');