#Hi I want to change my panel appearance based on currently active tenant! But I'm facing a problem!

4 messages · Page 1 of 1 (latest)

iron bay
#

public function panel(Panel $panel): Panel { $appearance = Appearance::whereBelongsTo(Filament::getTenant()); return $panel ->id('shop') ->path('shop') ->login() ->colors([ 'danger' => Color::Rose, 'gray' => Color::Slate, 'info' => Color::Blue, 'primary' => Color::Teal, 'success' => Color::Emerald, 'warning' => Color::Orange, ])
its showing this error

Call to a member function newCollection() on null
In this step I think filament didn't know what is my current tenant maybe panel isn't initialized yet!!

so are there any way to set appearance for my tenant panel ?

void jacinthBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> ✅ Mark Solution

vital prism
#

The tenant is identified through a middleware so cannot access it inside a ServiceProvider. Create a middleware, use Filament::getCurrentPanel() to get the panel and then apply your changes.

void jacinthBOT