lacodix/laravel-global-or-scope
Add multiple Eloquent global scopes that are grouped and applied with OR logic instead of the default AND. Use a simple trait to register OR-scopes and optionally disable some or all of them per query with withoutGlobalOrScopes().
scope* methods across models.For Executives: "This Laravel package lets us enforce consistent query rules (e.g., ‘always filter by tenant’) across our app with minimal code. It’s now compatible with Laravel 12, so we can use it for new projects or upgrades without risk. For example, if we’re building a multi-tenant SaaS, this handles tenant isolation automatically—saving dev time and reducing bugs. It’s a low-effort way to standardize how data is queried app-wide."
For Engineering:
*"The laravel-global-or-scope package adds static, app-wide query scopes (e.g., GlobalScope for soft deletes or tenant IDs). Key updates:
scope* methods with declarative scopes (e.g., User::query()->get() now auto-applies your global rules).TenantScope to all models in a multi-tenant app, or enforce ‘active only’ filters globally. Trade-off: Scopes are static—avoid for dynamic runtime filters."*How can I help you explore Laravel packages today?