public function nav_items() { if ($this->taxonomy == 'nav_menu') { return $this->posts()->orderBy('menu_order'); } return $this; }