Download the PHP package tonystore/laravel-round-robin without Composer
On this page you can find all versions of the php package tonystore/laravel-round-robin. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download tonystore/laravel-round-robin
More information about tonystore/laravel-round-robin
Files in tonystore/laravel-round-robin
Package laravel-round-robin
Short Description Laravel package to generate sweepstakes using the Round Robin algorithm. Supports any number of teams, as long as they are greater than a minimum value specified in the configuration file. Built with Laravel Collections for better handling of arrays.
License MIT
Homepage https://github.com/tony98ms/laravel-round-robin
Informations about the package laravel-round-robin
laravel-round-robin
Laravel package to generate sweepstakes using the Round Robin algorithm. Supports any number of teams, as long as they are greater than a minimum value specified in the configuration file. Built with Laravel Collections for better handling of arrays.
REQUIREMENTS
INSTALLATION VIA COMPOSER
Step 1: Composer
Run this command line in console.
Step 2: Publish Config File
Publish Config File
In your configuration file you can define the following:
Usage
If you pass it an array of equipment, it will return an array, which contains an array of objects. For each object you will have the home team, away team and the round it belongs to:
You can use this package in several ways:
With static function:
OR
With a helper function:
To generate the schedule without shuffling the teams:
To generate the calendar I shuffle the teams with a seed:
Any of the available options will generate a collection of ready-made rounds, which you can manipulate at will.
To generate the schedule without shuffling the teams:
In the same way you can use all the options available in Laravel Collections. Additionally we added a collection to convert rounds to objects, you can use it in the following way.
There is also the option to generate round-trip rounds. Example:
You can filter the calendar by the available phases. Example: