1234567891011121314151617 |
- <?php
- class Comment extends Eloquent {
- protected $table = "comments";
- public function autor() {
- return $this->belongsTo('User', 'user');
- }
- public function objekt() {
- return $this->belongsTo('Film', 'film');
- }
- public function scopeNeueste($query) {
- return $query->orderBy('updated_at', 'DESC')->take(7);
- }
- }
|