My question would be, i have my layout view, but what i want to do is insert a dynamic sub-bar into that layout which will change depending on what section of the web platform you are in. ? how would be the best way of going about that by staying within laravel framework structure ?
clearly my journey starts in the routes web.php file as the route will determine what will be displayed in the subbar ?, do i direct it to a controller first ?
Hey Snapey, thank you for the start direction, so i could use this include to direct to a class to construct the sub-bar using the route value as the key ?
You can write a view composer which looks for the sub-bar being rendered and prepares it for the view. Its not something tackled with routes and controllers.
Thank you for this direction, i will def use it for my project, my only question about the route is that it is the only data source to tell the data which section it currently is in and the section it is in is critical to to the view of the subbar on that section