+Bewertungen, Meistgewünschter Film, Sortierung nach Votes
This commit is contained in:
14
app/models/News.php
Normal file
14
app/models/News.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
class News extends Eloquent {
|
||||
protected $table = "news";
|
||||
|
||||
public function ersteller() {
|
||||
return $this->belongsTo('User', 'author');
|
||||
}
|
||||
|
||||
public function scopeAktuell($query) {
|
||||
return $query->orderBy('updated_at', 'DESC')->take(5);
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user