silviolleite / laravel-pwa

Looks like an app, feels like an app, but IS NOT an app.
MIT License
961 stars 154 forks source link

Multi tenancy with whitelabel #92

Closed geekasso closed 1 year ago

geekasso commented 1 year ago

Hello community,

I have PWA running and working, however I am not sure of the best way to implement the PWA for multi tenancy, where tenants have their own branding.

The app uses subdomains to identify the tenants and display their own branding based on the subdomain.

For example:

app.com - the main app branded with the app's icons, colors, and titles a.app.com - a tenant domain with their own logos, icons, and titles

The issue:

Since the config loads before the pages, in the meta blade, I implemented logic to generate the meta fields using the white label information (icons, splash screens, titles, colors, etc.), however the PWA/manifest only shows the main app's information without any of the branding I am providing in the meta blade.

If I look in the inspector, the meta tags have the icons, splash screens and titles going to the correct paths, but the manifest seems to only be using the values from the config

Is there a guide or additional information to accomplish this?

Thank you.

geekasso commented 1 year ago

I forgot to mention that the only way I currently see accomplishing this, is by extending the ManifestService class and writing similar logic to place the correct values, but I don't want to do that if there is something more or less "built in".

Thanks again.