]> git.localhorst.tv Git - alttp.git/blob - app/Models/Participant.php
8aac88ce54a04877ecefe43c6f67950ec0d09c63
[alttp.git] / app / Models / Participant.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 Participant extends Model
9 {
10         use HasFactory;
11
12         public function tournament() {
13                 return $this->belongsTo(Tournament::class);
14         }
15
16         public function user() {
17                 return $this->belongsTo(User::class);
18         }
19
20         protected $casts = [
21                 'roles' => 'array',
22         ];
23
24         protected $with = [
25                 'user',
26         ];
27
28 }