In a web application I'm building with Laravel I'm trying to generate a menu based upon data in the database.
I'm able to create the middleware and I've added it to kernel.php so that it's executed upon every request. In the middware I can fetch the data from the model.
Now the next step I though I had to take was sending the data to the view. I've googled around for it, but I did not find any sample how to do this. Am I going the wrong way with middleware? or is there some way to do this?