使用Laravel构建类别的正确方法是什么
我们有一个数字平台,其功能是使用户能够自己创建一个在线商店,
我们面临着类别的问题。它们是内置的,但是他们花了很长时间才能在浏览器上加载
什么是易于构建它的正确方法,适用于服务器和浏览器
We have a digital platform whose function is to enable the user to create an online store on his own
We are facing a problem with the categories. They are built in, but they take a very long time to load on the browser
What is the correct way to build it lightly and suitable for server and browser
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果它是由JS库渲染的,则可以使用浏览器LocalStorage可以帮助您更快地加载它。

但是,如果您自己渲染它,那是一个很好的做法,可以按照下图中所示的方式存储类别。
并使用缓存机制将菜单结构存储在内存中,并将其检索到前端如此之快。
If it is rendering by js libraries, maybe using browser localStorage helps you load it faster.

But if you are rendering it by yourself, It is a good practice to store categories as depicted in the image below.
and use caching mechanism to store the menu structure in memory and retrieve it in the front-end so fast.