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.
Laravel Date Scopes adds a rich set of Eloquent query scopes for filtering records by common date ranges (e.g., today, last week, month-to-date) with a simple, expressive API. Add the DateScopes trait to your model and instantly query time-based subsets, then chain any builder operations (like sum() or avg()) for reporting and analytics.
use DateScopes; to enable dozens of date scopes on a modelofToday(), ofLastWeek(), monthToDate(), ofLastYear() and more->sum('amount'), ->where(...))How can I help you explore Laravel packages today?