Skip to content

Instantly share code, notes, and snippets.

@CodeWithDennis
Created December 13, 2024 09:22
Show Gist options
  • Save CodeWithDennis/c988e77f0e22031a1f562a7ef74a9ea8 to your computer and use it in GitHub Desktop.
Save CodeWithDennis/c988e77f0e22031a1f562a7ef74a9ea8 to your computer and use it in GitHub Desktop.
Solid Navigation Icon - FilamentPHP - Resource
<?php
namespace App\Traits;
trait HasActiveIcon
{
public static function getActiveNavigationIcon(): ?string
{
return str(self::getNavigationIcon())
->replace('heroicon-o-', 'heroicon-s-')
->toString();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment