ended3월 16일· 1 sources
How I Built a Complete Multi-Tenancy System for My Laravel SaaS - Without Spatie
Spatie 없이 Laravel SaaS용 멀티테넌시 시스템을 직접 구축한 방법
Why it matters
The author describes building a custom multi-tenancy system for a Laravel SaaS application (Kohana.io) without using the Spatie package, now being extracted into an open-source framework called LaraFoundry. The system uses a BelongsToCompany Eloquent trait with global scopes for automatic data isolation per company, and a config-driven permission registration approach. Key design decisions include single-database tenancy with company_id scoping, table-prefixed column references to avoid join ambiguities, and centralized permission definitions in a config file.
1
Sources
+0
24h
—
Growth
186d
Active
LaravelMulti-TenancyLaraFoundrySaaSEloquentSpatie