how can i use logo from database for Panel Provider ->brandLogo() function
i have a general settings table in database which store all general informations like site name, contact number, logo and etc.
How can i call the database in PanelProvider.php file to retrieve the logo from the settings table
when i tried to call the Settings::query()...... i get a Connection not found error.
2 Replies
->brandLogo(fn () => Settings::query()...)
?@lzx1996 any idea ?
I find a solution, that works in my case.
Created new middleware "SetCustomSettings" and attached on User Panel Provider.
In my case, each customer has your specific team and this team has the configs.
If you need to get just first record from database, you could use a closure function inside brandLogo.
Something like this.