xoco70/laravel-tournaments ? reverse-engineered prompt

Reverse engineered prompt

Build me a Laravel package for generating tournament brackets out of the box.

I want it to handle single elimination trees, single elimination with a preliminary round, playoff brackets, and a third place match. It should let me generate the full tournament structure as well as just the tree or just the fight list. I also need it to work with either competitors or teams, and to let me customize things like the preliminary round size and the number of areas used in the bracket.

Please include the main models and relationships for tournaments, championships, settings, groups, fights, competitors, teams, and users, plus the helper methods to check tournament type and championship type. It should be usable through a simple generation strategy on a championship, so I can create the tournament, add competitors, choose the right strategy, and run it.

If anything is unclear, look up the current Laravel docs or use the package conventions that make sense. I’d like it to feel like a clean reusable package with tests and a basic demo setup.