diff options
Diffstat (limited to 'app/Rugby/Model/Tournament.php')
-rw-r--r-- | app/Rugby/Model/Tournament.php | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/app/Rugby/Model/Tournament.php b/app/Rugby/Model/Tournament.php new file mode 100644 index 0000000..64d9a45 --- /dev/null +++ b/app/Rugby/Model/Tournament.php @@ -0,0 +1,19 @@ +<?php + +namespace App\Rugby\Model; + +use App\Rugby\Model\Match; + +use Illuminate\Database\Eloquent\Model; + +class Tournament extends Model +{ + protected $table = 'tournaments'; + + protected $fillable = ['name']; + + public function matches() + { + return $this->belongsToMany(Match::class); + } +} |