neuester Stand
This commit is contained in:
@@ -16,7 +16,7 @@ class Film extends Eloquent {
|
||||
}
|
||||
|
||||
public function scopeZuletztGesehen($query) {
|
||||
return $query->whereNotNull('gesehen')->orderBy('gesehen')->take(5);
|
||||
return $query->whereNotNull('gesehen')->orderBy('gesehen', 'DESC')->take(5);
|
||||
}
|
||||
|
||||
public function scopeNeuesteVorschlage($query) {
|
||||
|
||||
@@ -12,6 +12,8 @@ class User extends Eloquent implements UserInterface, RemindableInterface {
|
||||
*/
|
||||
protected $table = 'users';
|
||||
|
||||
protected $softDelete = true;
|
||||
|
||||
/**
|
||||
* The attributes excluded from the model's JSON form.
|
||||
*
|
||||
|
||||
@@ -7,7 +7,7 @@ class Vote extends Eloquent {
|
||||
return $this->belongsTo('Film', 'film');
|
||||
}
|
||||
|
||||
public function user() {
|
||||
public function voter() {
|
||||
return $this->belongsTo('User', 'user');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user