I have multiple layouts for the project.
So I'm calling a different layout base on the view requested.
I want to share a variables to a specific layout, and other variables for another one, and so on ..
i.e:
in layouts folder:
1- app.blade
2- base.blade
3- project1.blade
I want to share data to the layouts, without having to hard code these data every time I call a view in the controller:
if any view extend app.blade, then data1 is shared
if any view extend base.blade, then data2 is shared, and so on ..
is there an easy way to achieve this ?