1234567891011121314 |
- <?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);
- }
-
- }
|