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

@@ -14,6 +14,7 @@ class Application extends Model
];
public function user()
{
return $this->belongsTo('App\User', 'applicantUserID', 'id');
@@ -29,10 +30,16 @@ class Application extends Model
return $this->hasOne('App\Appointment', 'applicationID', 'id');
}
public function votes()
{
return $this->belongsToMany('App\Vote', 'votes_has_application');
}
public function setStatus($status)
{
return $this->update([
'applicationStatus' => $status
]);
}
}