Large Datasets, Laravel, Sql, Eloquent, Optimization.
'published_at', ]; public function scopePublished($query) { return $query->where('published', true); } public function scopePopular($query) { return $query->where('views', '>', 1000); } public function comments() { return $this->hasMany(Comment::class); } } class Comment extends Model { public