Download the PHP package xoco70/laravel-tournaments without Composer
On this page you can find all versions of the php package xoco70/laravel-tournaments. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download xoco70/laravel-tournaments
More information about xoco70/laravel-tournaments
Files in xoco70/laravel-tournaments
Package laravel-tournaments
Short Description A Laravel 5.4+ Package that allows you to generate Tournaments tree
License MIT
Homepage https://github.com/xoco70/laravel-tournaments
Informations about the package laravel-tournaments
Laravel Tournaments
A Laravel plugin that generate tournaments out of the box
- Features
- Installation
- Demo
- Usage
- Data Model
- Models
- Include views
- Limitations
- Troubleshooting
- Changelog
Features
- Single Elimination Trees Generation
- Single Elimination with Preliminary Round Generation
- Playoff Generation
- Third place fight
- List of Fights Generation
- Customize Preliminary Round Size
- Customize area number (1,2,4,8)
- Modify Single Elimination Tree generation on the fly
- Use teams instead of competitors
Installation
NOTE: Depending on your version of Laravel, you should install a different
version of the package:
Laravel Version
Laravel Tournament Version
8
0.17
5.8 -> 7
0.16
5.7
0.15
5.6
0.14
5.5
0.13
NOTE: Depending on your version of Laravel, you should install a different version of the package:
Laravel Version | Laravel Tournament Version |
---|---|
8 | 0.17 |
5.8 -> 7 | 0.16 |
5.7 | 0.15 |
5.6 | 0.14 |
5.5 | 0.13 |
First, you'll need to install the package via Composer:
Finally, from the command line again, publish the default configuration file:
Demo
To run the demo, you need to generate Tournaments, Championships, Users, Competitors and Settings
Run Migrations:
Seed dummy data:
WARNING: Don't do this in production, it would wipe all your data. Use this line for demo purpose only
Add TreeController ( you can find it in demo repository)
Add your custom routes
You will be able to access the demo at http://yourdomain.com/
Usage
Data model
Models
Tournament
Check tournament type:
Check tournament level:
Championship
NOTE: $fighter can be an instance of
Team
orCompetitor
Determine strategy:
Determine group size:
Determine championship type:
FightersGroup
NOTE: $fighter can be an instance of
Team
orCompetitor
To get the instance name:
NOTE: This plugin use laravel-nestedset. This means you can navigate with
$group->children()
or$group->parent()
or use any methods available in this great plugin.
Competitor
Team
Fight
Views
Preliminary tree
Single Elimination tree
Fight List
Run Functional Tests
vendor/bin/phpunit tests
Limitations
This is a work in progress, and tree creation might be very complex, so there is a bunch of things to achieve.
- Seed fighter
- Manage more than 1 fighter out of preliminary round
- Modify Preliminary Round generation on the fly
- Use any number of area ( restricted to 1,2,4,8)
- Manage n+1 case : When for instance, there is 17 competitors in a direct elimination tree, there will have 15 BYES. We can improve that making the first match with 3 competitors.
- Double elimination
Troubleshooting
Specified key was too long error
For those running MariaDB or older versions of MySQL you may hit this error when trying to run migrations: As outlined in the Migrations guide to fix this all you have to do is edit your AppServiceProvider.php file and inside the boot method set a default string length:
With this configuration, you must have at least...
This error means you don't have enough competitors / teams to create given tree Try to increase competitor number, decrease areas or preliminary group size, if preliminary round is active
ChangeLog:
- v0.17: Update to Laravel 8
- v0.16: Update to Laravel 5.8
- v0.15: Update to Laravel 5.7
- v0.14: Update to Laravel 5.6 / PHP 7.2 support
- v0.13: Manage third place fight
- v0.12: Update to Laravel 5.5
- v0.11: Initial Version