How can I add global variable for base layout ?
tuongnguyendev opened this issue · comments
Tuong Nguyen commented
How can I add global variable for base layout ?
Usually I use View :: composer. Currently with the theme I do not know how?
View::composer(['skins.*'], function ($view) {
$pagewebsites = PageWebsite::active()->get();
$view->with('pagewebsites', $pagewebsites);
});
Like that code.
Thank you
Shipu Ahamed commented
Add service provider.