Hou to create a dynamic navigation menu?

Hello I am trying to build a blog CMS where i have a custom menu option, where admin can set menu items from list of post, pages or category. I am confused about the relation. Like menu have many items and each items can contain a, post, page, or category or a custom link. How can i achieve this? Just like this image.

Menu has many menu items, menu item belongs to a linkable, where a linkable is a polymorphic association that can have any other model associated to it (Post, Category, Tag, Page, etc. Something along those lines

1 Like