Is there any way to change the 'logo _img' dynamically at runtime looking for the path through the database?
I have some customers using the same system, and each company has its logo, I would like the logo to change according to the path registered in the database.
Well ... since I didn't get any answers, I gathered what I got in several forums and put my puzzle together, here's the answer for those who need it in the future:
_I added the following listener inside the Boot of AppServiceProvider.php listening to the construction of the menu and it worked! I just needed to use Helper -_config ([''])
_Although I had to change the tenant table to add the columns: logo and logo_xl as AdminLTE uses two types of logo, one for the open menu and another smaller logo when the menu is collapsed ..._
$events->listen(BuildingMenu::class, function (BuildingMenu $event) {
$user = Auth::user();
config(['adminlte.logo_img' => $user->tenant->logo]);
config(['adminlte.logo_img_xl' => $user->tenant->logo_xl]);
});
Most helpful comment
Well ... since I didn't get any answers, I gathered what I got in several forums and put my puzzle together, here's the answer for those who need it in the future:
_I added the following listener inside the Boot of AppServiceProvider.php listening to the construction of the menu and it worked! I just needed to use Helper -_
config ([''])_Although I had to change the tenant table to add the columns: logo and logo_xl as AdminLTE uses two types of logo, one for the open menu and another smaller logo when the menu is collapsed ..._