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

This commit is contained in:
2023-07-13 19:02:14 +02:00
parent dbf004b0b0
commit c689ad7849
8 changed files with 129 additions and 97 deletions

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;
}
}

View File

@@ -17,7 +17,7 @@ class RouteServiceProvider extends ServiceProvider
*
* @var string
*/
public const HOME = '/dashboard';
public const HOME = '/';
/**
* Define your route model bindings, pattern filters, etc.