Neues Update

This commit is contained in:
2013-11-09 21:23:58 +01:00
parent c17b699d1b
commit 114e658b7b
7 changed files with 157 additions and 28 deletions

View File

@@ -7,7 +7,11 @@ class Comment extends Eloquent {
return $this->belongsTo('User', 'user');
}
public function film() {
public function objekt() {
return $this->belongsTo('Film', 'film');
}
public function scopeNeueste($query) {
return $query->orderBy('updated_at', 'DESC')->take(5);
}
}