hasMany('App\Models\Menu','parent_id','id'); } //所有菜单递归 public function childs() { return $this->child()->with('childs'); } }