Kommentieren und Bewerten hinzugefügt. Einstellungsseite hinzufügt (macht noch nichts).
This commit is contained in:
@@ -71,4 +71,10 @@ class Film extends Model
|
||||
public function scopeSuggested($query) {
|
||||
return $query->whereNull('seen')->whereNull('rejected')->orderBy('updated_at', 'DESC');
|
||||
}
|
||||
|
||||
public function userMayEvaluate(int $userid) {
|
||||
if(is_null($this->seen)) return false;
|
||||
if($this->comments()->where('user', $userid)->where('evaluation', '>', 0)->count() > 0) return false;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user