Major changes - Vote system now finished
This commit is contained in:
21
app/Vote.php
21
app/Vote.php
@@ -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');
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user