| Package Data | |
|---|---|
| Maintainer Username: | jjsquady |
| Maintainer Contact: | marcelotk_15@hotmail.com (Marcelo Augusto) |
| Package Create Date: | 2017-04-23 |
| Package Last Update: | 2017-04-27 |
| Home Page: | |
| Language: | PHP |
| License: | MIT |
| Last Refreshed: | 2025-11-03 15:13:50 |
| Package Statistics | |
|---|---|
| Total Downloads: | 784 |
| Monthly Downloads: | 1 |
| Daily Downloads: | 0 |
| Total Stars: | 1 |
| Total Watchers: | 2 |
| Total Forks: | 0 |
| Total Open Issues: | 0 |
Round-Robin is an easy way to create schedule with round-robin(rr) technique. I used the mnito's base code for this. Look here: https://github.com/mnito/round-robin
composer update:"marcelotk15/round-robin": "0.1.*"
or run composer require marcelotk15/round-robin
config/app.php and add the following to the providers array:Laravel\RoundRobin\RoundRobinServiceProvider::class,
config/app.php and add the following to the facades array:'RoundRobin' => Laravel\RoundRobin\RoundRobinFacade::class,
use Laravel\RoundRobin\RoundRobin;
Setuping (without Facade):
$teams = ['Arsenal', 'Atlético de Madrid', 'Borussia', 'Barcelona','Liverpool', 'Bayer 04', 'Real Madrid'];
$schedule = new RoundRobin($teams)->make();
// or with 'from' static method
$schedule = RoundRobin::from($teams)->make();
With a facade:
$teams = ['Arsenal', 'Atlético de Madrid', 'Borussia', 'Barcelona','Liverpool', 'Bayer 04', 'Real Madrid'];
$schedule = RoundRobin::from($teams)->make();
Generate a schedule without randomly shuffling the teams using the $shuffle boolean parameter:
$teams = ['Arsenal', 'Atlético de Madrid', 'Borussia', 'Barcelona','Liverpool', 'Bayer 04', 'Real Madrid'];
$schedule = RoundRobin::from($teams)->doNotShuffle()->make();
Use your own seed with the $seed integer parameter for predetermined shuffling:
$teams = ['Arsenal', 'Atlético de Madrid', 'Borussia', 'Barcelona','Liverpool', 'Bayer 04', 'Real Madrid'];
$schedule = RoundRobin::from($teams)->shuffle(15)->make();
If you want a double Round-robin:
$teams = ['Arsenal', 'Atlético de Madrid', 'Borussia', 'Barcelona','Liverpool', 'Bayer 04', 'Real Madrid'];
$schedule = RoundRobin::from($teams)->doubleRoundRobin()->make();
If you want a get a Schedule Object:
$teams = ['Arsenal', 'Atlético de Madrid', 'Borussia', 'Barcelona','Liverpool', 'Bayer 04', 'Real Madrid'];
$schedule = RoundRobin::from($teams)->makeSchedule();
Laravel Round-Robin is free software distributed under the terms of the MIT license.