]> git.localhorst.tv Git - alttp.git/blob - app/Models/Tournament.php
f8b4804859fd6b03447901574647cf91941ced9b
[alttp.git] / app / Models / Tournament.php
1 <?php
2
3 namespace App\Models;
4
5 use Illuminate\Database\Eloquent\Factories\HasFactory;
6 use Illuminate\Database\Eloquent\Model;
7
8 class Tournament extends Model
9 {
10         use HasFactory;
11
12         public function participants() {
13                 return $this->hasMany(Participant::class);
14         }
15
16         public function protocols() {
17                 return $this->hasMany(Protocol::class)->orderBy('created_at', 'DESC');
18         }
19
20         public function rounds() {
21                 return $this->hasMany(Round::class)->orderBy('created_at');
22         }
23
24 }