d10480b9f488095ba04da4d6605c42d0a85337b3
Session-only storage was flaky in production: sessions get regenerated,
scoped per-subdomain differently, or lost on error pages. User reported
switcher had no effect on visible language.
Add a persistent 'app_locale' cookie set by the /locale/{lang} route.
SetLocale middleware now resolves in this order:
1. app_locale cookie (survives everything)
2. session locale
3. authenticated user.locale
4. tenant.settings.language
5. hard-coded 'ro'
Cookie is 1-year, path=/, not httpOnly (JS can read for debug), not
Secure (works on any protocol including plain HTTP during dev).
Result: click a language button → cookie set + session set → next
GET reads cookie → response localized → user sees translated text
immediately. Even if the session is later regenerated or cleared,
the cookie keeps the choice.
Suite: 306 passed (853 assertions). Unchanged.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
AutoCRM
SaaS CRM multi-tenant pentru autoservice și magazin piese auto.
Stack
- Laravel 12 + Filament 5
- Octane (FrankenPHP runtime)
- MariaDB 11.4
- Redis 7
- Stancl/Tenancy v3 (single-DB multi-tenant)
Domenii
service.mir.md— panou central super-admin<slug>.service.mir.md— instanță tenant
Documentație
Vezi /root/service/docs/00-index.md în repo-ul părinte (separat de cod) pentru:
- Arhitectură + decizii
- Setup multi-tenant (3 niveluri izolare)
- Toate cele 31 module preluate din prototip
- Operațiuni (deploy / backup / add-tenant / troubleshoot)
Dev local
cp .env.example .env
composer install
npm install
php artisan key:generate
php artisan migrate
npm run build
php artisan octane:start --server=frankenphp
Deploy
Push pe main → Coolify auto-deploy.
License
Proprietary. © 2026.
Description
Languages
PHP
78%
Blade
21.7%
Dockerfile
0.2%