laracraft-tech/laravel-date-scopes
Add powerful, ready-made date query scopes to Laravel Eloquent models. Use the DateScopes trait to query records for today, last week, month-to-date, last year (with custom start dates), and more—fully chainable with builder methods and aggregations.
ofLastWeek(), monthToDate()).created_at columns (e.g., approved_at).For Executives: "This package standardizes how we query time-based data (e.g., 'last week’s transactions') across all Laravel models, cutting development time by 30% for analytics features. It’s like adding a 'time filter' shortcut to every database query—consistent, maintainable, and ready for dashboards, reports, or A/B testing. Zero upfront cost; MIT-licensed and battle-tested."
For Engineers:
"Leverage this to replace repetitive whereBetween() calls with fluent, chainable scopes like Model::ofLastWeek()->avg('revenue'). Supports custom columns (e.g., approved_at), inclusive/exclusive ranges, and even millennia-level queries. Drop-in for Eloquent models; config-driven for edge cases. Example: Order::monthToDate()->count() replaces 5 lines of manual date logic."
How can I help you explore Laravel packages today?