You recently made a purchase of Multi Tenant SAAS module of Bagisto. Now, you might want to do some tweaks in the theme for all the tenants from Super Admin panel but there aren’t much functionalities for front end tweaks. So today in this tutorial, we’ll see the correct way how one can make changes in front end for all the tenants as a Super Admin. Let’s get started.
In order to achieve there are few very easy steps involved that you need to follow. Below are those mentioned steps:
Create a style.php file inside:
Package Name -> src -> Resources -> views -> style.php
What will style.php do ?
In this file we will pick the colors of particular places super Admin end (which we have created recently), and change those colors in css file.
Here, I have picked the colors from Super Admin with a condition where if the colors from super admin are not set, It will take the default colors.
Next step is to fire an event where your theme will pick up these settings whene the theme will be loaded on server.
Create an EventServiceProvider.php file in the same package:
Package Name -> Providers -> EventServiceProvider.php
In the above code I have rendered an event and called my style.php file.
This is one very easy step and most of you have already know how to do that.
You just have to create a service provider and add your event service provider file in it.
And you are done.
Now the colors can be changed of header and navbar for a single tenant.
We have a domain with the name bagsaas.com
We’ll create sub domains for tenants:
So that’s how you can make changes in all the tenant from the Super Admin Panel.
Be the first to comment.