Kommentieren und Bewerten hinzugefügt. Einstellungsseite hinzufügt (macht noch nichts).

This commit is contained in:
daniel committed 2023-07-13 19:02:14 +02:00
1 parent dbf004b0b0
commit c689ad7849
8 files changed
+129 -97

No files matched your search

+6
View File
@@ -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;
}
}