How to connect the nested controller in Laravel v5?

Hello, I started learning Laravel, I can't quite understand how I distribute the controllers header, footer and include them on each page, how to connect them I understood, but I want info($data) that is passed to the view, was from the appropriate controller. This implementation is in opencart 2.x Has the page controller in which the controllers are connected to the header and footer, and the connection returns the result of the method plug-in class. $data['footer'] = $this->load->controller('common/footer'); $data['header'] = $this->load->controller('common/header');

and here the data has already been imported into the desired form. I hope clearly explained to what needed help.
June 14th 19 at 20:10
1 answer
June 14th 19 at 20:12
Use the templates to display the header and footer.
And print data using shared view:

Find more questions by tags LaravelPHP