Comments (7)
Your menus should come from the database anyway. I store them in a DB and use this package for display purposes.
from menus.
Can you give snippet example of how you serialize to db and create back into menus?
from menus.
You can see it here: https://github.com/AsgardCms/Menu/blob/develop/Providers/MenuServiceProvider.php#L147 (biggest part of that service provider).
from menus.
And saving into the db, that's however you prefer, either the powerful nested sets or just the classic parent_id
trick.
from menus.
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.
from menus.
There are other packages to handle this, like baum.
I don't think it should be related, this leaves the freedom to us to choose which method we prefer to save our tree structures in the database.
from menus.
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..
from menus.
Related Issues (20)
- Ordering menu items HOT 2
- Pingpong menus {{ csrf_token() }} issue with laravel 5.1.6 HOT 1
- Polymorphic / Model support HOT 1
- Active item on menu items having route with any parameter HOT 7
- image as title HOT 1
- Artisan error HOT 1
- illuminate/support v5.1.1 requires php >=5.5.9
- Conflict facades
- Not works anymore... HOT 7
- Laravel 5.2 problem HOT 1
- Object of class Illuminate\Routing\UrlGenerator could not be converted to string HOT 2
- Title in dividers ?
- Menu not active
- Modular Menu? HOT 1
- Auth Role with menu
- Docs is down... HOT 1
- Please support Laravel 5.3
- Docs leads to scam site HOT 3
- Error package:discover !
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from menus.