public function scopeofUri($query, $uri) { return $query->where('page_id', Page::whereslug($uri)->first()->id)->orderBy('order'); }