mpyw/laravel-local-class-scope
where() clauses in controllers with reusable scopes (e.g., User::scoped(ActiveScope::class)).Adopt if:
AgeScope::class, [25, 30]).Look elsewhere if:
Scope interface.For Executives: "This package lets our devs reuse query logic (e.g., filtering ‘active’ users) like building blocks—cutting duplicate code and speeding up API/model development. It’s a lightweight, Laravel-native solution that aligns with future framework updates, reducing long-term tech debt. Think of it as ‘copy-paste’ for database queries, but cleaner and scalable."
For Engineering: *"Leverage this to:
where() calls in controllers with scoped classes (e.g., Model::scoped(ActiveScope::class)).AgeScope::class, [25, 40]).composer require mpyw/laravel-local-class-scope. Works with Laravel 11/12 and PHP 8.2+."*How can I help you explore Laravel packages today?