Game-Jaming/Backend/Models/Group.php

27 lines
619 B
PHP

<?php
namespace Backend\Models;
use Illuminate\Database\Eloquent\Model as Eloquent;
class Group extends Eloquent
{
protected $fillable = [
'groupName', 'groupAmount', 'votes'
];
public function gameJam(){
return $this->belongsTo(GameJam::class);
}
public function keyWord(){
return $this->hasMany(KeyWord::class);
}
public function gameData(){
return $this->belongsTo(GameData::class);
}
public function password(){
return $this->hasOne(Password::class);
}
public function vote(){
return $this->hasMany(Vote::class);
}
}