Log1x / filament-starter

A beautiful starting point for your next TALL stack project using Filament. ⚡
https://github.com/Log1x/filament-starter
MIT License
368 stars 55 forks source link

Change navigation icon and group for filament-exceptions and filament-logger #59

Closed LeftPinkie closed 5 months ago

LeftPinkie commented 5 months ago

How to I change the panel navigation icon and group name for filament-exceptions and filament-logger?

Log1x commented 5 months ago

For Logger, you can set the navigationLabel on the extended ActivityResource class similar to other Filament resources.

For Exceptions, if you want full control, you should be able something similar to extending the ExceptionResource and then removing the plugin from AdminPanelProvider since all it does is register it's built-in resource.

Another option is to dump the Exception plugin's locale files and changing it in filament-exceptions::filament-exceptions.labels.navigation.

LeftPinkie commented 5 months ago

For Logger, you can set the navigationLabel on the extended ActivityResource class similar to other Filament resources.

For filament-logger, I have tried setting in app/Filament/Resources/ActivityResource.php:

protected static ?string $navigationGroup = 'SYSTEM';

and does not work. Also trying to figure out where the icon is set so that I can change.

Log1x commented 5 months ago

Hmm, that should work. The icon can be set the same, https://github.com/Z3d0X/filament-logger/blob/main/src/Resources/ActivityResource.php#L29-L32

Log1x commented 5 months ago

Oh nevermind, I see, they override the method. You'll have to use that instead of the property or return the property inside of it.

https://github.com/Z3d0X/filament-logger/blob/main/src/Resources/ActivityResource.php#L325-L333