How to pass data to multiple view page in laravel using single controller function

By | November 15, 2016

I have three view template/blade files. and one controller

View files:
————
side_bar.blade.php
main_view.blade.php
dashboardhome.blade.php

here side_bar.blade.php and main_view.blade.php included to dashboardhome.blade.php

Controller files:
——————
displaydashboard function will redirect to dashboardhome.blade.php page with one array of data passed to side_bar.blade.php and other array of data passing to main_view.blade.php

dashboardcontroller.php