atannex/scopable
Scopable is a lightweight Laravel package that brings reusable, composable query scopes to Eloquent models. Define common filters once as scope classes and apply them across queries to keep filtering logic clean, consistent, and easy to maintain.
composer require atannex/scopable; confirm PHP 8.2+ and Laravel 11/12 before adopting.draft, published, and scheduled states plus publish/expiry dates. Add the package trait, configure the relevant columns, then use published() for public listings, scheduled() for editorial queues, and draft() for admin views.where clauses.createdThisWeek() and publishedWithin(...) for dashboards, RSS/sitemaps, reporting, and analytics endpoints; pass explicit date ranges and keep timezone handling consistent.toSql() or query logging when combining published, active, highlighted, and window scopes.How can I help you explore Laravel packages today?