PHPackages                             tanthammar/recurring - 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. tanthammar/recurring

ActiveLibrary

tanthammar/recurring
====================

Laravel Eloquent RRULE tools

1.2.1(5mo ago)79.1k1MITPHPPHP ^8.1|^8.2|^8.3|^8.4

Since Apr 20Pushed 5mo ago1 watchersCompare

[ Source](https://github.com/tanthammar/recurring)[ Packagist](https://packagist.org/packages/tanthammar/recurring)[ Docs](https://github.com/tanthammar/recurring)[ RSS](/packages/tanthammar-recurring/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (8)Dependencies (3)Versions (9)Used By (0)

Laravel Eloquent RRULE helpers
==============================

[](#laravel-eloquent-rrule-helpers)

This package adds Eloquent helpers for [Simshauns php Recurr package](https://github.com/simshaun/recurr)

[![Latest Version on Packagist](https://camo.githubusercontent.com/866c65e400465018670ea2f6028996e80b5601c975bda04bc924262a03d074ac/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f74616e7468616d6d61722f726563757272696e672e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/tanthammar/recurring)[![Total Downloads](https://camo.githubusercontent.com/6622d2a01869df7c3f63ae479f94904f6d9887d525cbef727a2f61f8f4f73ba3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f74616e7468616d6d61722f726563757272696e672e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/tanthammar/recurring)

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

[](#installation)

You can install the package via composer:

```
composer require tanthammar/recurring
```

Important
---------

[](#important)

- `start_at` and `end_at` are expected to be stored in its timezone, not converted to utc in db. The `Builder` will convert them using the timezone attribute.
- `end_at` represents **DURATION** not last recurrence, src: [simshaun/recurr#44](https://github.com/simshaun/recurr/issues/44)

Usage
-----

[](#usage)

Let's say you have a DatePattern model in your codebase.

The Builder parses them in combination with the timezone attribute.

Your model must have the following attributes:

```
protected $casts = [
    'start_at'  => 'immutable_date', //required
    'end_at'    => 'immutable_date', //nullable, represents duration, not last recurrence
    'timezone' => 'string', //required
    'str_rule'  => 'string', //required
    'except_on' => 'array', //array with excluded dates
];
```

Apply the `IsRecurring` trait to the model

```
class DatePattern extends Model
{
    use IsRecurring;
    //...
}
```

After saving a string `rrule` to the `str_rule` field, you'll have access to the following methods. For further information about additional methods see

All `RecurrenceCollection` methods returns max 732 recurrences. (Same as parent simshaun/recurr package). Use the `$count` parameter to set how many recurrences you want returned.

```
$dp = App\Models\DatePattern::first();

$dp->recurr()->first(): bool|Recurrence
$dp->recurr()->firstStart(): bool|Carbon
$dp->recurr()->firstEnd(): bool|Carbon

$dp->recurr()->last(): bool|Recurrence
$dp->recurr()->lastStart(): bool|Carbon
$dp->recurr()->lastEnd(): bool|Carbon

$dp->recurr()->next(): bool|Recurrence
$dp->recurr()->nextStart(): bool|Carbon
$dp->recurr()->nextEnd(): bool|Carbon

$dp->recurr()->current(): bool|Recurrence
$dp->recurr()->currentStart(): bool|Carbon
$dp->recurr()->currentEnd(): bool|Carbon

$dp->recurr()->rule(): Rule

$dp->recurr()->all(): RecurrenceCollection, //limited to 732 recurrences

$dp->recurr()->schedule(?int $count): RecurrenceCollection

$dp->recurr()->scheduleBetween(string|DateTime $startDate, string|DateTime $endDate, ?int $count): RecurrenceCollection

$dp->recurr()->scheduleBefore(string|DateTime $beforeDate, ?int $count): RecurrenceCollection

$dp->recurr()->scheduleAfter(string|DateTime $afterDate, ?int $count): RecurrenceCollection
```

Contributing
------------

[](#contributing)

Happy for every contribution, make a PR :)

License
-------

[](#license)

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

###  Health Score

50

—

FairBetter than 95% of packages

Maintenance73

Regular maintenance activity

Popularity29

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity71

Established project with proven stability

 Bus Factor1

Top contributor holds 92.6% 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 ~189 days

Recently: every ~221 days

Total

8

Last Release

154d ago

Major Versions

0.5 → 1.0.02023-05-30

PHP version history (4 changes)0.5PHP ^8.1

1.0.0PHP ^8.1|^8.2

1.1.0PHP ^8.1|^8.2|^8.3

1.2.0PHP ^8.1|^8.2|^8.3|^8.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/e71fd6e89c09af4ce7dc4a1c4fd3e04716326b6e98ed9003f092a8462a5ef422?d=identicon)[Stockholm](/maintainers/Stockholm)

---

Top Contributors

[![tanthammar](https://avatars.githubusercontent.com/u/21239634?v=4)](https://github.com/tanthammar "tanthammar (25 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (1 commits)")

---

Tags

laravelrecurringrruletanthammar

### Embed Badge

![Health badge](/badges/tanthammar-recurring/health.svg)

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

###  Alternatives

[mozex/laravel-scout-bulk-actions

A Laravel Scout extension for bulk importing and flushing of all models.

1033.4k](/packages/mozex-laravel-scout-bulk-actions)

PHPackages © 2026

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