HasBrandName Concern
I came across HasBrandName when I was figuring out how the tenants can manage their 'app_name'.
I don't think its documented yet, but I can just call the brandName function on the
$panel
var right? Like this for example:
$panel->brandName(app(GeneralSettings::class)->site_name)
Am I doing this right?
I thought adding this here is also helpful for people who will search for something alike.6 Replies
Am I doing this right?Yeah, looks good π
Hi Patrick thanks for your response. I actually ran into an issue just now. I tried running my migrations on a new machine, but since the PanelProvider acts like Laravel ServiceProvider I believe, the migration couldn't run. I got the error that the settings table does not exist yet. The panel/service provider is already trying to access the Settings table, before any migrations ran.
This problem happens only on an empty database, when the database already has the Settings table for example, the migration would run fine. But on a clean database when you try to migrate, it doesn't work.
Should we do a check if the table exists? just commenting out isn't really a solution i guess.
Interesting. Maybe you can instead override the
getBrandName()
method on the Panel class?Hey @maxvankuik could you explain how you are populating GeneralSettings? Are you using other provider ? Are you using your application with tenant ?
Users can populate the data through the admin panel. No other provider I believe. Yes it was supposed to support multiple tenants who can all set their own brand name.
Just sharing my solution: