PHPackages                             midnite81/timekeeper - 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. midnite81/timekeeper

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

midnite81/timekeeper
====================

A series of scopes for Laravel Models to do with Time Management.

v1.0.1(6y ago)13.2kMITPHP &gt;=5.5.9

Since Jun 18Compare

[ Source](https://github.com/midnite81/timekeeper)[ Packagist](https://packagist.org/packages/midnite81/timekeeper)[ RSS](/packages/midnite81-timekeeper/feed)WikiDiscussions Synced today

READMEChangelog (5)Dependencies (1)Versions (8)Used By (0)

TimeKeeper
==========

[](#timekeeper)

[![Latest Stable Version](https://camo.githubusercontent.com/83d07c16fcfaa22e38cf73f92c3f5c9fd2f2687a02f47ca4a09741f6eb809358/68747470733a2f2f706f7365722e707567782e6f72672f6d69646e69746538312f74696d656b65657065722f76657273696f6e)](https://packagist.org/packages/midnite81/timekeeper) [![Total Downloads](https://camo.githubusercontent.com/d87ccaa8dfde7fb8f038df7ab13942360c711fb29bf7e025e7c6f43b2c37c620/68747470733a2f2f706f7365722e707567782e6f72672f6d69646e69746538312f74696d656b65657065722f646f776e6c6f616473)](https://packagist.org/packages/midnite81/timekeeper) [![Latest Unstable Version](https://camo.githubusercontent.com/c1c9ed498359c834a756b843c7200c8f5f443a10ae955f29d7c302642e39412a/68747470733a2f2f706f7365722e707567782e6f72672f6d69646e69746538312f74696d656b65657065722f762f756e737461626c65)](https://packagist.org/packages/midnite81/timekeeper) [![License](https://camo.githubusercontent.com/a5e1f14cec74a591a908bb41543e2d78b02584687099cbd041dcc4c2af6a1afd/68747470733a2f2f706f7365722e707567782e6f72672f6d69646e69746538312f74696d656b65657065722f6c6963656e73652e737667)](https://packagist.org/packages/midnite81/timekeeper)

A series of scopes for Laravel Models to do with Time Management.

Please note: This project is a work in progress.

Relationship Diagram
--------------------

[](#relationship-diagram)

[![Relationship Diagram](https://raw.githubusercontent.com/midnite81/timekeeper/master/diagram/relationships.png)](https://raw.githubusercontent.com/midnite81/timekeeper/master/diagram/relationships.png)

Installation
------------

[](#installation)

This package requires PHP 5.6+ and Laravel 5.

To install through composer include the package in your `composer.json`.

```
"midnite81/timekeeper": "0.2.*"

```

Run `composer install` or `composer update` to download the dependencies or you can run `composer require midnite81/timekeeper`.

### Laravel 5 Integration

[](#laravel-5-integration)

There is no service provider to install. Simply include the trait to the model you need to use it on.

Example Usage
-------------

[](#example-usage)

On your model simply add the use statement to the Model you want to use it on.

```
use Midnite81\TimeKeeper\Traits\TimeKeeper;

class YourModel
{
    use TimeKeeper;

    // ...

}
```

Then reference it in your controller or service etc;

```
    public function check() {

        $overlap = YourModel::overlapsWith('2016-01-01 15:32:00', '2016-01-01 16:46:00')->exists();
        $after = YourModel::after('2016-01-01 10:00:00', 2016-01-01 11:00:00', 'start', 'end')->exists();

        // ...

    }
```

All scopes take the following arguments

- Start DateTime (yyyy-mm-dd hh:ii)
- End DateTime (yyyy-mm-dd hh:ii)
- Start Time Column in Database (optional, defaults to start\_time)
- End Time Column in Database (optional, defaults to end\_time)

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity63

Established project with proven stability

 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

Every ~270 days

Recently: every ~338 days

Total

6

Last Release

2309d ago

Major Versions

0.2.1 → v1.0.02020-03-02

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/254850?v=4)[Simon Rogers](/maintainers/midnite81)[@midnite81](https://github.com/midnite81)

---

Top Contributors

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

---

Tags

phptimescopes

### Embed Badge

![Health badge](/badges/midnite81-timekeeper/health.svg)

```
[![Health](https://phpackages.com/badges/midnite81-timekeeper/health.svg)](https://phpackages.com/packages/midnite81-timekeeper)
```

###  Alternatives

[markwalet/nova-modal-response

A Laravel Nova asset for Modal responses on an action.

17818.7k](/packages/markwalet-nova-modal-response)[dater/dater

Compact PHP library for working with date/time in different formats &amp; timezones.

14283.6k](/packages/dater-dater)[zjkal/time-helper

一个简单快捷的PHP日期时间助手类库。 a smart PHP datetime helper library.

21030.2k2](/packages/zjkal-time-helper)[maherelgamil/arabicdatetime

Easy and useful tool to generate arabic or hijri date with multi-language support for laravel

414.6k](/packages/maherelgamil-arabicdatetime)

PHPackages © 2026

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