---
title: "Comment by Kamran Khan on \"Enforcing Multi-Tenant Isolation Structurally, Not by Convention\" | Hashnode"
description: "The Laravel version of this exact failure is the global scope everyone adds to the tenant models and then quietly bypasses in the admin panel — one withoutGloba"
url: "https://hashnode.com/posts/enforcing-multi-tenant-isolation-structurally-not-by-convention/6ad225758674ee5ef382956c/comment/6ad4c6db716bb43fe5ddf7d4"
---

[Discussion](https://hashnode.com/posts/enforcing-multi-tenant-isolation-structurally-not-by-convention/6ad225758674ee5ef382956c)

Comment [Enforcing Multi-Tenant Isolation Structurally, Not by Convention](https://hashnode.com/posts/enforcing-multi-tenant-isolation-structurally-not-by-convention/6ad225758674ee5ef382956c)

[Kamran Khan](https://hashnode.com/@kamrankhandev)

[Oct 18](https://hashnode.com/posts/enforcing-multi-tenant-isolation-structurally-not-by-convention/6ad225758674ee5ef382956c/comment/6ad4c6db716bb43fe5ddf7d4)

The Laravel version of this exact failure is the global scope everyone adds to the tenant models and then quietly bypasses in the admin panel — one withoutGlobalScopes() in an export, one raw DB::select in a report, and the same class of leak opens. The registry idea is the part I'd steal: structural enforcement validated at write time rather than a scope applied at read time. StackShortlist's test suggestion is the missing piece, honestly. Without a failing test on registry drift, the registry becomes a convention with extra steps — and the eighth endpoint is only safe until someone adds the ninth relation by hand.
