Where to place menu logic in Laravel?

前端 未结 2 1407
[愿得一人]
[愿得一人] 2021-01-31 22:38

What is best conceptual place to put menu data logic in Laravel. If I use Menu bundle where to put it. In Base_Controller create additional function or something di

2条回答
  •  孤城傲影
    2021-01-31 23:30

    How about fetching the data in a view composer and using a HTML macro for generating the HTML?

    Laravel often has many ways of doing things. That said, this can probably be a little overwhelming and confusing at times.

提交回复
热议问题