PHPackages                             tobymaxham/laravel-datetime-scopes - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. tobymaxham/laravel-datetime-scopes

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

tobymaxham/laravel-datetime-scopes
==================================

A package to simply query your datasets.

v1.0(4y ago)08MITPHPPHP ^8.0

Since Feb 20Pushed 3y ago2 watchersCompare

[ Source](https://github.com/TobyMaxham/laravel-datetime-scopes)[ Packagist](https://packagist.org/packages/tobymaxham/laravel-datetime-scopes)[ RSS](/packages/tobymaxham-laravel-datetime-scopes/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (3)Versions (2)Used By (0)

TobyMaxham Laravel DateTime Scopes
==================================

[](#tobymaxham-laravel-datetime-scopes)

[![Latest Version on Packagist](https://camo.githubusercontent.com/b32cf54c67a6ffa0312c4a0d9851a3be2801525e17db91260e1ad5e6adca5009/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f746f62796d617868616d2f6c61726176656c2d6461746574696d652d73636f7065732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/tobymaxham/laravel-datetime-scopes)[![Total Downloads](https://camo.githubusercontent.com/40a20cc681cb39bb6c899b1dd9f030896c8e4e544626a992f9ff8b6434f56976/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f746f62796d617868616d2f6c61726176656c2d6461746574696d652d73636f7065732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/tobymaxham/laravel-datetime-scopes)

Composer install package
------------------------

[](#composer-install-package)

```
composer require tobymaxham/laravel-datetime-scopes
```

Usage
-----

[](#usage)

```
use TobyMaxham\LaravelDateTimeScopes\DateTimeScopes;

class Invoice extends Model
{
    use DateTimeScopes;
}
```

```
// samples.php

Invoice::ofYesterday(); // query invoices created yesterday
Invoice::ofLastWeek(); // query invoices created in the last week
Invoice::ofLastMonth(); // query invoices created in the last month
Invoice::ofLastQuarter(); // query invoices created in the last quarter
Invoice::ofLastYear(); // query invoices created in the last year
```

Also there are the methods `ofLastMinutes` and `ofLastHour` you could use to fetch entries that are created in the last minute/hour.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

If you've found a bug regarding security please mail  instead of using the issue tracker.

Support me
----------

[](#support-me)

[![ko-fi](https://camo.githubusercontent.com/201ef269611db7eb6b5d08e9f756ab8980df3014b64492770bdf13a6ed924641/68747470733a2f2f6b6f2d66692e636f6d2f696d672f676974687562627574746f6e5f736d2e737667)](https://ko-fi.com/Z8Z4NZKU)

Credits
-------

[](#credits)

- [TobyMaxham](https://github.com/TobyMaxham)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1542d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/900ab0a66bf701f3fb99a4db54276b4984cf3cf9b55ccad6df65c034f58be85f?d=identicon)[TobyMaxham](/maintainers/TobyMaxham)

---

Top Contributors

[![TobiasMaxham](https://avatars.githubusercontent.com/u/263875125?v=4)](https://github.com/TobiasMaxham "TobiasMaxham (4 commits)")

---

Tags

laravelzhylonlaravel-datetime-scope

### Embed Badge

![Health badge](/badges/tobymaxham-laravel-datetime-scopes/health.svg)

```
[![Health](https://phpackages.com/badges/tobymaxham-laravel-datetime-scopes/health.svg)](https://phpackages.com/packages/tobymaxham-laravel-datetime-scopes)
```

###  Alternatives

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M687](/packages/barryvdh-laravel-ide-helper)[spatie/laravel-enum

Laravel Enum support

3655.4M31](/packages/spatie-laravel-enum)[psalm/plugin-laravel

Psalm plugin for Laravel

3274.9M308](/packages/psalm-plugin-laravel)[spatie/laravel-livewire-wizard

Build wizards using Livewire

4061.0M4](/packages/spatie-laravel-livewire-wizard)[laracraft-tech/laravel-useful-additions

A collection of useful Laravel additions!

58109.4k](/packages/laracraft-tech-laravel-useful-additions)[bensampo/laravel-embed

Painless responsive embeds for videos, slideshows and more.

142146.8k](/packages/bensampo-laravel-embed)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
