PHPackages                             viaductmedia/roundrobin-scheduler - 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. viaductmedia/roundrobin-scheduler

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

viaductmedia/roundrobin-scheduler
=================================

Utils for round-robin tournaments. Laravel ready.

022

Since Sep 8Compare

[ Source](https://github.com/ViaductMedia/roundrobin-scheduler)[ Packagist](https://packagist.org/packages/viaductmedia/roundrobin-scheduler)[ RSS](/packages/viaductmedia-roundrobin-scheduler/feed)WikiDiscussions Synced yesterday

READMEChangelogDependenciesVersions (1)Used By (0)

Round-robin scheduler
=====================

[](#round-robin-scheduler)

You can easily create round-robin rounds for a tournament.

Laravel ready.

There are two methods. One is **BergerAlgorithm($teams)** which takes an array of teams as argument and returns the set of matches.

Given an array of teams like:

```
['Juventus', 'Milan', 'Roma', 'Napoli', 'Inter']

```

the method returns a multilevel array, in which the first level is the game day:

```
[
    [
        ['REST', 'Juventus'], ['Inter', 'Milan'],  ['Napoli', 'Roma']
    ],
    [
        ['Juventus', 'Milan'], ['Roma', 'REST'], ['Napoli', 'Inter']
    ],
    [
        ['Roma', 'Juventus'], ['Milan', 'Napoli'], ['REST', 'Inter']
    ],
    [
        ['Juventus', 'Napoli'], ['Inter', 'Roma'], ['REST', 'Milan']
    ],
    [
        ['Inter', 'Juventus'], ['Napoli', 'REST'], ['Roma', 'Milan']
    ]
]

```

If the team count is odd, it adds a dummy team.

The other one is **distributeAmongRounds($teams, $rounds)** which takes as arguments an array of teams and the desired amount of rounds. I suggest you to shuffle() your team dataset before providing it to the function.

Given an array of teams like this and '3' as a desired amount of rounds:

```
['Milan', 'Roma', 'Juventus', 'Napoli', 'Inter', 'Lazio', 'Fiorentina', 'Udinese', 'Sampdoria', 'Genoa'],

```

the method returns a multilevel array:

```
[
    ['Genoa', 'Fiorentina', 'Napoli', 'Milan'],
    ['Sampdoria', 'Lazio', 'Juventus'],
    ['Udinese', 'Inter', 'Roma']
]

```

### Installation

[](#installation)

```
composer require lucagentile\roundrobin-scheduler

```

#### Laravel:

[](#laravel)

add the ServiceProvider class name under 'providers' in config/app.php

```
Gautile\RoundRobin\RoundRobinSchedulerServiceProvider::class

```

then add the alias under 'aliases' for the Facade

```
'RoundRobinScheduler' => Gautile\RoundRobin\Facades\RoundRobinScheduler::class,

```

### License

[](#license)

MIT

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity29

Early-stage or recently created project

 Bus Factor1

Top contributor holds 50% 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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/89364909?v=4)[ViaductMedia](/maintainers/ViaductMedia)[@ViaductMedia](https://github.com/ViaductMedia)

---

Top Contributors

[![lucagentile](https://avatars.githubusercontent.com/u/4802220?v=4)](https://github.com/lucagentile "lucagentile (3 commits)")[![robsontenorio](https://avatars.githubusercontent.com/u/118955?v=4)](https://github.com/robsontenorio "robsontenorio (2 commits)")[![ViaductMedia](https://avatars.githubusercontent.com/u/89364909?v=4)](https://github.com/ViaductMedia "ViaductMedia (1 commits)")

### Embed Badge

![Health badge](/badges/viaductmedia-roundrobin-scheduler/health.svg)

```
[![Health](https://phpackages.com/badges/viaductmedia-roundrobin-scheduler/health.svg)](https://phpackages.com/packages/viaductmedia-roundrobin-scheduler)
```

###  Alternatives

[eminiarts/nova-tabs

Laravel Nova - Tabs.

4694.3M20](/packages/eminiarts-nova-tabs)[cryde/json-text-extractor

Helper that will extract JSON from plain text

128.7k](/packages/cryde-json-text-extractor)

PHPackages © 2026

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