I would like to make a ViewMenuComposer that fills my menu from a global array. As I was creating my Livewire components, I would like to register them in an array to automatically populate a side menu.
What is the best practice for me to do this? For each route registered in routes/web.php would I populate this array or would I be able to define it in my Livewire components? I believe that a component code is not read if it is not being accessed, right?
I wouldn't want to leave my component/controller to record what I'm developing in some file.
Thanks.
0 comments:
Post a Comment
Thanks