neuester Stand

This commit is contained in:
2013-09-11 16:02:44 +02:00
parent 5cb555e869
commit 7d21be1a66
14 changed files with 707 additions and 29 deletions

View File

@@ -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) {

View File

@@ -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.
*

View File

@@ -7,7 +7,7 @@ class Vote extends Eloquent {
return $this->belongsTo('Film', 'film');
}
public function user() {
public function voter() {
return $this->belongsTo('User', 'user');
}
}