-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Database menus #32
Comments
Your menus should come from the database anyway. I store them in a DB and use this package for display purposes. |
Can you give snippet example of how you serialize to db and create back into menus? |
You can see it here: https://github.com/AsgardCms/Menu/blob/develop/Providers/MenuServiceProvider.php#L147 (biggest part of that service provider). |
And saving into the db, that's however you prefer, either the powerful nested sets or just the classic |
Well that's the point, you have to do this manually in your app. It would be very useful to have this built into the package. |
There are other packages to handle this, like baum. |
I still think it would be easier if there was a built in way to store in the database in a 'sane' format. Using the lgt rgt tree structure would be fine and suit 99% of users. I feel like you shouldn't need to do this each time you use the menus package, or care about what structure it's stored in. The main thing that matters is the ability to tell it where to store (DB, Config, etc) and ability to pull back the full menu instance. If you need finer control over the database structure, create your own data store. A few issues back the dev said he was working on database support. Not sure how far he got with it though.. |
Would be cool to add storage mechanism for database menus.
The text was updated successfully, but these errors were encountered: