pechtelt
pechtelt
FFilament
Created by pechtelt on 11/20/2024 in #❓┊help
Custom Styling Panel
For further me's. You can create an middleware and add this:
FilamentColor::register([
'primary' => Color::hex($primary_color),
'secondary' => Color::hex($secondary_color),
]);
Filament::getCurrentPanel()->brandLogo(asset($logo));
FilamentColor::register([
'primary' => Color::hex($primary_color),
'secondary' => Color::hex($secondary_color),
]);
Filament::getCurrentPanel()->brandLogo(asset($logo));
13 replies
FFilament
Created by pechtelt on 11/20/2024 in #❓┊help
Custom Styling Panel
Wow... way easier than i tought. Thank you so much, all clear!
13 replies
FFilament
Created by pechtelt on 11/20/2024 in #❓┊help
Custom Styling Panel
So with this middleware, i'm already changing the colors based on the user that is logged in but want to know if there is also something you can do to change the brandLogo / Favicon. Like:
Filament::Register([
'brandLogo' => asset(...)
'favicon' => asset(...)
)]
Filament::Register([
'brandLogo' => asset(...)
'favicon' => asset(...)
)]
13 replies
FFilament
Created by pechtelt on 11/20/2024 in #❓┊help
Custom Styling Panel
No worries and thanks for your time @Dennis Koch. I think i'm not clearly enough - i will explain a bit more: We are building an multi-tenancy application and the TenantPanel should be whitelabel. But right now i set in the TenantPanelProvider those values:
->brandLogo(asset('img/logo.svg'))
->favicon(asset('img/favicon.svg'))
->brandLogo(asset('img/logo.svg'))
->favicon(asset('img/favicon.svg'))
What i want to get done is as user1 is logging in brandLogo & favicon should show logo-user1.svg and favicon-user1.svg for example. Same for user2, etc. Basically get the styling colors (done with above example), but looking for the solution to also be able to change brandLogo and favicon based on user.
13 replies
FFilament
Created by pechtelt on 11/20/2024 in #❓┊help
Custom Styling Panel
Or are there better options?
13 replies
FFilament
Created by pechtelt on 11/20/2024 in #❓┊help
Custom Styling Panel
Thanks for your reply, this working but every user is in the same panel and filled the logo/favicon there but want to overwrite it in the same middleware as above?
13 replies
FFilament
Created by pechtelt on 11/20/2024 in #❓┊help
Custom Styling Panel
Was able to do it like this with creating an middleware (thanks to @Lara Zeus):
public function handle(Request $request, Closure $next): Response
{
return app(StartSession::class)
->handle($request, function ($request) use ($next) {
if (! auth()->check()) {
return $next($request);
}

FilamentColor::register([
'primary' => Color::hex($primary_color),
'secondary' => Color::hex($secondary_color),
]);

return $next($request);
});
}
public function handle(Request $request, Closure $next): Response
{
return app(StartSession::class)
->handle($request, function ($request) use ($next) {
if (! auth()->check()) {
return $next($request);
}

FilamentColor::register([
'primary' => Color::hex($primary_color),
'secondary' => Color::hex($secondary_color),
]);

return $next($request);
});
}
Does anyone got an idea if this is also possible with brandLogo & favicon?
13 replies
FFilament
Created by razor on 11/21/2024 in #❓┊help
how to change login page background and make the icon bigger
9 replies
FFilament
Created by Erdos Holland on 11/20/2024 in #❓┊help
New Record Modal does not work in Select Form
Don't know for sure but try to help: - What is the relation between user and category I have an working version and did it like this: ->createOptionForm(function () { return [ TextInput::make('name') ->label('Name') ->required() ->unique(), Hidden::make('user_id')->default(Auth::id()), ]; }) ->createOptionUsing(function (array $data): int { return ContactList::create($data)->id; }), Again, don't know for sure but hope this helps!
4 replies
FFilament
Created by Hugo on 5/11/2024 in #❓┊help
Dynamic columns on Importer class
I had the same question, found out that you can make use of getOptionsFormComponents() on your importer class. See: https://discord.com/channels/883083792112300104/1233021779102924852
10 replies
FFilament
Created by Hugo on 5/11/2024 in #❓┊help
Dynamic columns on Importer class
Hi Hugo, did you make this work?
10 replies
FFilament
Created by Sydd on 4/18/2024 in #❓┊help
Logger plugin only for super_admin
Maybe you can check this: https://log-viewer.opcodes.io/docs/3.x
8 replies
FFilament
Created by andyphung on 1/19/2024 in #❓┊help
Hi all
Will try to help, had this issue never by myself but can try.! Do you have an page called Dashboard in your Filament > Pages folder?
6 replies
FFilament
Created by Milorn on 1/17/2024 in #❓┊help
redirect to edit/view resource modals or open them manually
4 replies