Check Here
Check Here

How to make frontend changes for all the Tenants as a Super Admin


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:

Step 1: Create configuration for super Admins.

  1. Create a new package. If you don’t know how to create a package, Refer below doc
  2. After Creating a package, create menus in Super Admin panel.
    Creating menus in Super Admin is almost similar to that of creating menus in Admin so you can either take a look in previously created Menus or refer this:

Step 2: Create a style.php file

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.

Step 3: Call style.php from event service provider

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.

Step 4: Register your event service provider to service provider

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.

Let’s check out a live example

We have a domain with the name

We’ll create sub domains for tenants:

Now we’ll just change the color from Super Admin frontend

So that’s how you can make changes in all the tenant from the Super Admin Panel.

. . .


Add Your Comment

Be the first to comment.

Little complicated for newcomer. But overall features and continuous update are superb. At first we were worried. Then their support makes us feel confident. I wish more developer contribute in Bagisto.

Md Rezaul Karim

Md Rezaul Karim
Talk to Sales


Live Chat
Start a Project

    Message Sent!

    If you have more details or questions, you can reply to the received confirmation email.

    Back to Home