Major changes - Vote system now finished

This commit is contained in:
2020-05-30 00:20:39 +01:00
parent cc8c293cc6
commit d15c0cb12f
32 changed files with 1791 additions and 17 deletions

View File

@@ -6,5 +6,24 @@ use Illuminate\Database\Eloquent\Model;
class Vote extends Model
{
//
public $fillable = [
'userID',
'allowedVoteType',
];
public $touches = [
'application'
];
public function user()
{
return $this->belongsTo('App\User', 'id', 'userID');
}
public function application()
{
return $this->belongsToMany('App\Application', 'votes_has_application');
}
}