belongsTo(Menu::class, 'parent_id'); } /** * Get the child menus of this menu. */ public function children(): HasMany { return $this->hasMany(Menu::class, 'parent_id'); } }