neolinks / round-robin

Round Robin for Laravel 5

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Round-Robin (Laravel 5 Package)

Latest Stable Version Total Downloads Latest Unstable Version License

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

SUPPORT PHP 5.4 >

Installation

  1. In order to install Laravel Round-Robin, just add the following to your composer.json. Then run composer update:
"marcelotk15/round-robin": "0.1.*"

or run composer require marcelotk15/round-robin

  1. Open your config/app.php and add the following to the providers array:
Laravel\RoundRobin\RoundRobinServiceProvider::class,

Controllers and etc

use Laravel\RoundRobin\RoundRobin;

Using (Examples)

Setuping:

$teams = ['Arsenal', 'Atlético de Madrid', 'Borussia', 'Barcelona','Liverpool', 'Bayer 04', 'Real Madrid'];
$roundRobin = new RoundRobin($teams);
$roundRobin = $roundRobin->build();

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'];
$roundRobin = new RoundRobin($teams);
$rounRobin->doNotShuffle();
$roundRobin = $roundRobin->build();

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'];
$roundRobin = new RoundRobin($teams);
$rounRobin->shuffle(15);
$roundRobin = $roundRobin->build();

If you want a double Round-robin:

$teams = ['Arsenal', 'Atlético de Madrid', 'Borussia', 'Barcelona','Liverpool', 'Bayer 04', 'Real Madrid'];
$roundRobin = new RoundRobin($teams);
$rounRobin->doubleRoundRobin();
$roundRobin = $roundRobin->build();

License

Laravel Round-Robin is free software distributed under the terms of the MIT license.

About

Round Robin for Laravel 5


Languages

Language:PHP 100.0%