Populate base view data only once

1

I have a view database that has a several dropdowns that depend on database values, naming it as "base.blade.php".

I also have several other views that extend from this base, such as depoimentos.blade.php , contato.blade.php , and so on. In this way, views need to have these dropdowns, as well as have their own data, in addition to the data needed in the base view, so that in the DepositionsController, ContactsController and etc, can pass the data of the view itself and the base view.

But suppose I have 10 more pages, I have to add the base view data to all the controllers.

Is there any other way for me to populate the base view data once?

    
asked by anonymous 26.12.2017 / 18:01

0 answers