alizharb/filament-game-icons

Game Icons Pack ready for Filament 4

1.0.11 2025-09-01 12:21 UTC

This package is auto-updated.

Last update: 2025-09-06 23:59:05 UTC


README

Filament Game Icons

The ultimate Game Icons collection for FilamentPHP

Latest Version Total Downloads License PHP Version

Code Quality FilamentPHP

Transform your FilamentPHP applications with 4000+ beautiful game icons

๐Ÿ“– Documentation โ€ข ๐Ÿš€ Quick Start โ€ข ๐Ÿ’ก Examples โ€ข ๐Ÿค Contributing

โœจ Features

๐ŸŽฏ Core Features

  • ๐ŸŽฎ 4000+ Game Icons - Complete collection from game-icons.net
  • ๐Ÿ”ง Type Safe - Full PHP enum with IDE autocompletion
  • ๐Ÿท๏ธ Human Readable - Implements HasLabel for better UX
  • ๐Ÿ“ฆ Zero Config - Works out of the box
  • โšก Optimized - Blazing fast with smart caching

๐Ÿ› ๏ธ Developer Experience

  • ๐Ÿ” Searchable - Built-in search and categorization
  • ๐ŸŽจ Customizable - Easy theming and icon replacement
  • ๐Ÿ“ฑ Responsive - Looks great on all devices
  • ๐Ÿ”„ Auto-sync - Keep icons updated automatically
  • ๐Ÿ’ก IntelliSense - Full IDE support

๐Ÿš€ Quick Start

Installation

Install the package via Composer:

composer require alizharb/filament-game-icons

Asset Registration

Register the assets with FilamentPHP:

php artisan filament:assets

Basic Usage

Start using Game Icons immediately in any FilamentPHP component:

use Alizharb\FilamentGameIcons\Enums\GameIcons;
use Filament\Actions\Action;

Action::make('attack')
    ->icon(GameIcons::Sword)
    ->label('Attack with Sword')
    ->color('danger');

๐Ÿ“– Documentation

๐Ÿ—๏ธ Architecture Overview

graph TD
    A[FilamentPHP Application] --> B[Filament Game Icons Package]
    B --> C[GameIcons Enum]
    B --> D[Blade Game Icons]
    D --> E[Game Icons SVG Collection]

    C --> F[Type Safety]
    C --> G[IDE Autocompletion]
    C --> H[Search & Categories]

    style A fill:#FF6719
    style B fill:#3B82F6
    style E fill:#10B981
Loading

๐ŸŽฏ Component Integration

๐Ÿ“‹ Actions & Buttons
use Alizharb\FilamentGameIcons\Enums\GameIcons;
use Filament\Actions\Action;

// Basic action with icon
Action::make('attack')
    ->icon(GameIcons::Sword)
    ->color('danger')
    ->requiresConfirmation();

// Grouped actions
Action::make('combat_menu')
    ->icon(GameIcons::CrossedSwords)
    ->actions([
        Action::make('attack')->icon(GameIcons::Sword),
        Action::make('defend')->icon(GameIcons::Shield),
        Action::make('cast_spell')->icon(GameIcons::MagicSwirl),
    ]);
๐Ÿ“ Form Components
use Filament\Forms\Components\{Select, Toggle, Radio, Checkbox};

// Enhanced select with searchable icons
Select::make('character_class')
    ->options(GameIcons::getCharactersArray())
    ->searchable()
    ->native(false)
    ->allowHtml()
    ->placeholder('Choose your character class...');

// Toggle with custom icons
Toggle::make('is_magical')
    ->onIcon(GameIcons::MagicSwirl)
    ->offIcon(GameIcons::Sword)
    ->onColor('primary')
    ->offColor('gray');

// Radio with descriptions
Radio::make('weapon_preference')
    ->options(GameIcons::getWeaponsArray())
    ->descriptions([
        GameIcons::Sword->value => 'Balanced attack and defense',
        GameIcons::BowArrow->value => 'Long-range precision strikes',
        GameIcons::MagicSwirl->value => 'Powerful elemental damage',
    ]);
๐Ÿ“Š Table Columns
use Filament\Tables\Columns\{IconColumn, TextColumn};

// Dynamic status icons
IconColumn::make('player_status')
    ->icon(fn ($record): string => match ($record->status) {
        'online' => GameIcons::Person->value,
        'in_battle' => GameIcons::CrossedSwords->value,
        'resting' => GameIcons::Sleep->value,
        'offline' => GameIcons::Skull->value,
    })
    ->color(fn ($record): string => match ($record->status) {
        'online' => 'success',
        'in_battle' => 'warning',
        'resting' => 'info',
        'offline' => 'gray',
    })
    ->tooltip(fn ($record): string => "Player is {$record->status}");

// Equipment column with multiple icons
TextColumn::make('equipment')
    ->formatStateUsing(function ($record): string {
        $icons = [];
        if ($record->weapon) $icons[] = GameIcons::Sword->value;
        if ($record->armor) $icons[] = GameIcons::Armor->value;
        if ($record->magic_item) $icons[] = GameIcons::MagicSwirl->value;

        return view('components.icon-list', compact('icons'))->render();
    });
๐Ÿ“ฑ Widgets & Dashboard
use Filament\Widgets\StatsOverviewWidget as BaseWidget;
use Filament\Widgets\StatsOverviewWidget\Stat;

class GameDashboardWidget extends BaseWidget
{
    protected function getStats(): array
    {
        return [
            Stat::make('๐Ÿ‘ฅ Active Players', $this->getActivePlayers())
                ->description('Currently online')
                ->descriptionIcon(GameIcons::Person->value)
                ->chart([7, 2, 10, 3, 15, 4, 17])
                ->color('success'),

            Stat::make('โš”๏ธ Battles Today', $this->getBattlesToday())
                ->description('32% increase from yesterday')
                ->descriptionIcon(GameIcons::CrossedSwords->value)
                ->color('warning'),

            Stat::make('๐Ÿ† Achievements', $this->getAchievements())
                ->description('Unlocked this week')
                ->descriptionIcon(GameIcons::Trophy->value)
                ->color('primary'),

            Stat::make('๐Ÿ’ฐ Gold Earned', number_format($this->getGoldEarned()))
                ->description('Total server economy')
                ->descriptionIcon(GameIcons::GoldStack->value)
                ->color('warning'),
        ];
    }
}

๐Ÿ—‚๏ธ Icon Categories

Category Count Examples Usage
โš”๏ธ Weapons 500+ Sword, BowArrow, Shield, Axe Combat systems, inventory
๐Ÿ”ฎ Magic 300+ MagicSwirl, HealingPotion, Rune Spell systems, enchantments
๐Ÿ‘ค Characters 200+ Wizard, Warrior, Archer, Rogue Character selection, classes
๐Ÿ‰ Creatures 400+ Dragon, Wolf, Phoenix, Demon Bestiary, enemy systems
๐Ÿ’Ž Items 600+ Armor, Crown, Gem, Treasure Inventory, rewards
๐ŸŽฒ Dice & Gaming 50+ D4, D6, D20, Cards Game mechanics, RNG
๐Ÿฐ Environment 300+ Castle, Forest, Cave, Tower World building, locations
โš™๏ธ Interface 200+ Settings, Menu, Save, Load UI elements, navigation

๐Ÿ’ก Examples

๐ŸŽฎ Complete Gaming Resource

Character Management System
<?php

namespace App\Filament\Resources;

use Alizharb\FilamentGameIcons\Enums\GameIcons;
use Filament\Forms;
use Filament\Forms\Form;
use Filament\Resources\Resource;
use Filament\Tables;
use Filament\Tables\Table;

class CharacterResource extends Resource
{
    protected static ?string $model = Character::class;
    protected static ?string $navigationIcon = 'gameicon-person';
    protected static ?string $navigationGroup = 'Game Management';

    public static function form(Form $form): Form
    {
        return $form
            ->schema([
                Forms\Components\Section::make('Character Information')
                    ->icon(GameIcons::Person->value)
                    ->schema([
                        Forms\Components\TextInput::make('name')
                            ->required()
                            ->maxLength(255)
                            ->live(onBlur: true)
                            ->prefixIcon(GameIcons::Scroll->value),

                        Forms\Components\Select::make('class')
                            ->options([
                                'warrior' => 'Warrior',
                                'wizard' => 'Wizard',
                                'archer' => 'Archer',
                                'rogue' => 'Rogue',
                                'paladin' => 'Paladin',
                                'druid' => 'Druid',
                            ])
                            ->required()
                            ->searchable()
                            ->native(false)
                            ->prefixIcon(GameIcons::Person->value),

                        Forms\Components\Select::make('race')
                            ->options(GameIcons::getCreaturesArray())
                            ->searchable()
                            ->native(false)
                            ->prefixIcon(GameIcons::Dragon->value),
                    ]),

                Forms\Components\Section::make('Equipment & Stats')
                    ->icon(GameIcons::Sword->value)
                    ->schema([
                        Forms\Components\Select::make('primary_weapon')
                            ->options(GameIcons::getWeaponsArray())
                            ->searchable()
                            ->native(false)
                            ->prefixIcon(GameIcons::Sword->value),

                        Forms\Components\Select::make('armor_type')
                            ->options([
                                'light' => 'Light Armor',
                                'medium' => 'Medium Armor',
                                'heavy' => 'Heavy Armor',
                            ])
                            ->prefixIcon(GameIcons::Armor->value),

                        Forms\Components\Grid::make(3)
                            ->schema([
                                Forms\Components\TextInput::make('level')
                                    ->numeric()
                                    ->default(1)
                                    ->minValue(1)
                                    ->maxValue(100)
                                    ->prefixIcon(GameIcons::Trophy->value),

                                Forms\Components\TextInput::make('health')
                                    ->numeric()
                                    ->default(100)
                                    ->minValue(0)
                                    ->prefixIcon(GameIcons::Heart->value),

                                Forms\Components\TextInput::make('mana')
                                    ->numeric()
                                    ->default(50)
                                    ->minValue(0)
                                    ->prefixIcon(GameIcons::MagicSwirl->value),
                            ]),
                    ]),

                Forms\Components\Section::make('Status & Abilities')
                    ->icon(GameIcons::Lightning->value)
                    ->schema([
                        Forms\Components\Toggle::make('is_alive')
                            ->default(true)
                            ->onIcon(GameIcons::Heart->value)
                            ->offIcon(GameIcons::Skull->value)
                            ->onColor('success')
                            ->offColor('danger'),

                        Forms\Components\CheckboxList::make('abilities')
                            ->options([
                                'stealth' => 'Stealth',
                                'magic_resistance' => 'Magic Resistance',
                                'critical_strike' => 'Critical Strike',
                                'healing' => 'Healing',
                                'fire_immunity' => 'Fire Immunity',
                            ])
                            ->columns(2),

                        Forms\Components\Textarea::make('backstory')
                            ->rows(4)
                            ->placeholder('Tell us about your character\'s history...')
                            ->columnSpanFull(),
                    ]),
            ]);
    }

    public static function table(Table $table): Table
    {
        return $table
            ->columns([
                Tables\Columns\ImageColumn::make('avatar')
                    ->circular()
                    ->defaultImageUrl(fn ($record) => 'https://ui-avatars.com/api/?name=' . urlencode($record->name)),

                Tables\Columns\TextColumn::make('name')
                    ->searchable()
                    ->sortable()
                    ->weight('bold'),

                Tables\Columns\IconColumn::make('class')
                    ->icon(fn (string $state): string => match ($state) {
                        'warrior' => GameIcons::Warrior->value,
                        'wizard' => GameIcons::Wizard->value,
                        'archer' => GameIcons::Archer->value,
                        'rogue' => GameIcons::Rogue->value,
                        'paladin' => GameIcons::Paladin->value,
                        'druid' => GameIcons::Druid->value,
                        default => GameIcons::Person->value,
                    })
                    ->color(fn (string $state): string => match ($state) {
                        'warrior' => 'danger',
                        'wizard' => 'info',
                        'archer' => 'success',
                        'rogue' => 'warning',
                        'paladin' => 'primary',
                        'druid' => 'success',
                        default => 'gray',
                    })
                    ->tooltip(fn ($record): string => ucfirst($record->class)),

                Tables\Columns\ProgressColumn::make('health')
                    ->getStateUsing(fn ($record): float => $record->health / $record->max_health * 100)
                    ->color('success')
                    ->alignment('center'),

                Tables\Columns\TextColumn::make('level')
                    ->badge()
                    ->color('warning')
                    ->sortable(),

                Tables\Columns\IconColumn::make('is_alive')
                    ->boolean()
                    ->trueIcon(GameIcons::Heart->value)
                    ->falseIcon(GameIcons::Skull->value)
                    ->trueColor('success')
                    ->falseColor('danger'),

                Tables\Columns\TextColumn::make('created_at')
                    ->dateTime()
                    ->sortable()
                    ->toggleable(isToggledHiddenByDefault: true),
            ])
            ->defaultSort('level', 'desc')
            ->filters([
                Tables\Filters\SelectFilter::make('class')
                    ->options([
                        'warrior' => 'Warrior',
                        'wizard' => 'Wizard',
                        'archer' => 'Archer',
                        'rogue' => 'Rogue',
                        'paladin' => 'Paladin',
                        'druid' => 'Druid',
                    ])
                    ->indicator('Character Class'),

                Tables\Filters\Filter::make('alive_only')
                    ->label('Alive Characters Only')
                    ->query(fn ($query) => $query->where('is_alive', true))
                    ->default(),
            ])
            ->actions([
                Tables\Actions\ActionGroup::make([
                    Tables\Actions\ViewAction::make()
                        ->icon(GameIcons::Eye->value),

                    Tables\Actions\EditAction::make()
                        ->icon(GameIcons::Scroll->value),

                    Tables\Actions\Action::make('heal')
                        ->icon(GameIcons::HealingPotion->value)
                        ->color('success')
                        ->action(fn ($record) => $record->heal())
                        ->visible(fn ($record) => $record->health < $record->max_health),

                    Tables\Actions\Action::make('revive')
                        ->icon(GameIcons::Resurrection->value)
                        ->color('warning')
                        ->requiresConfirmation()
                        ->action(fn ($record) => $record->revive())
                        ->visible(fn ($record) => !$record->is_alive),
                ])
                ->icon(GameIcons::Menu->value),
            ])
            ->bulkActions([
                Tables\Actions\BulkActionGroup::make([
                    Tables\Actions\BulkAction::make('mass_heal')
                        ->icon(GameIcons::HealingPotion->value)
                        ->color('success')
                        ->action(fn ($records) => $records->each->heal()),

                    Tables\Actions\DeleteBulkAction::make()
                        ->icon(GameIcons::Skull->value),
                ]),
            ])
            ->emptyStateIcon(GameIcons::Person->value)
            ->emptyStateHeading('No characters yet')
            ->emptyStateDescription('Create your first character to begin your adventure!');
    }
}
๐Ÿ“Š Advanced Dashboard Widgets
use Filament\Widgets\ChartWidget;
use Filament\Widgets\StatsOverviewWidget as BaseWidget;

class GameStatsWidget extends BaseWidget
{
    protected function getStats(): array
    {
        return [
            Stat::make('๐ŸŽฎ Active Players', $this->getActivePlayers())
                ->description('Currently online')
                ->descriptionIcon(GameIcons::Person->value)
                ->chart($this->getPlayerChart())
                ->color('success')
                ->extraAttributes(['class' => 'game-stat-card']),

            Stat::make('โš”๏ธ Battles This Hour', $this->getBattlesThisHour())
                ->description('Peak combat activity')
                ->descriptionIcon(GameIcons::CrossedSwords->value)
                ->chart($this->getBattleChart())
                ->color('danger'),

            Stat::make('๐Ÿ† Achievements Unlocked', $this->getAchievementsToday())
                ->description('New achievements today')
                ->descriptionIcon(GameIcons::Trophy->value)
                ->color('warning'),

            Stat::make('๐Ÿ’ฐ Server Economy', '$' . number_format($this->getTotalGold()))
                ->description('Total gold in circulation')
                ->descriptionIcon(GameIcons::GoldStack->value)
                ->color('primary'),
        ];
    }
}

class PlayerActivityChart extends ChartWidget
{
    protected static ?string $heading = 'Player Activity';
    protected static string $color = 'info';
    protected static ?string $icon = 'gameicon-person';

    protected function getData(): array
    {
        return [
            'datasets' => [
                [
                    'label' => 'Online Players',
                    'data' => [65, 78, 66, 44, 56, 67, 75],
                    'backgroundColor' => 'rgba(59, 130, 246, 0.1)',
                    'borderColor' => 'rgb(59, 130, 246)',
                ],
            ],
            'labels' => ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
        ];
    }

    protected function getType(): string
    {
        return 'line';
    }
}

๐Ÿ”ง API Reference

๐Ÿท๏ธ GameIcons Enum Methods

// Core functionality
GameIcons::Sword->getLabel();           // "Sword"
GameIcons::Sword->value;                // "gameicon-sword"
GameIcons::toSelectArray();             // All icons as options
GameIcons::search('magic');             // Search icons
GameIcons::random();                    // Get random icon

// Category methods
GameIcons::getWeapons();                // Array of weapon icons
GameIcons::getMagic();                  // Array of magic icons
GameIcons::getCharacters();             // Array of character icons
GameIcons::getCreatures();              // Array of creature icons
GameIcons::getDice();                   // Array of dice icons

// Category arrays (for selects)
GameIcons::getWeaponsArray();           // ['gameicon-sword' => 'Sword', ...]
GameIcons::getMagicArray();             // ['gameicon-magic-swirl' => 'Magic Swirl', ...]
GameIcons::getCharactersArray();        // ['gameicon-wizard' => 'Wizard', ...]

// Utility methods
GameIcons::make('custom-icon');         // "gameicon-custom-icon"
GameIcons::count();                     // Total number of icons
GameIcons::categories();                // Available categories

๐Ÿ” Search & Filtering

// Advanced search
$results = GameIcons::search('sword', [
    'category' => 'weapons',
    'limit' => 10,
    'exact' => false
]);

// Filter by multiple criteria
$filtered = GameIcons::filter([
    'categories' => ['weapons', 'magic'],
    'exclude' => ['skull', 'death'],
    'include_only' => ['fire', 'ice', 'lightning']
]);

// Get icons by pattern
$elementalIcons = GameIcons::pattern('/^(fire|ice|lightning|earth)/i');

โš™๏ธ Configuration

๐ŸŽจ Custom Styling

Publish and customize the CSS:

php artisan vendor:publish --tag=filament-game-icons-styles
/* resources/css/filament-game-icons.css */
.game-icon {
  transition: all 0.2s ease-in-out;
}

.game-icon:hover {
  transform: scale(1.1);
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

/* Size variants */
.game-icon-xs {
  width: 0.75rem;
  height: 0.75rem;
}
.game-icon-sm {
  width: 1rem;
  height: 1rem;
}
.game-icon-md {
  width: 1.5rem;
  height: 1.5rem;
}
.game-icon-lg {
  width: 2rem;
  height: 2rem;
}
.game-icon-xl {
  width: 3rem;
  height: 3rem;
}

/* Color themes */
.game-icon-fire {
  color: #ef4444;
}
.game-icon-ice {
  color: #3b82f6;
}
.game-icon-nature {
  color: #10b981;
}
.game-icon-shadow {
  color: #6b7280;
}

๐Ÿ”ง Icon Replacement

Replace default FilamentPHP icons system-wide:

// In your AppServiceProvider boot() method
use Filament\Support\Facades\FilamentIcon;
use Filament\View\PanelsIconAlias;
use Alizharb\FilamentGameIcons\Enums\GameIcons;

public function boot(): void
{
    FilamentIcon::register([
        // Navigation
        PanelsIconAlias::PANELS_SIDEBAR_COLLAPSE_BUTTON => GameIcons::Menu->value,
        PanelsIconAlias::PANELS_SIDEBAR_EXPAND_BUTTON => GameIcons::Menu->value,

        // Actions
        PanelsIconAlias::ACTIONS_CREATE_ACTION => GameIcons::Plus->value,
        PanelsIconAlias::ACTIONS_EDIT_ACTION => GameIcons::Scroll->value,
        PanelsIconAlias::ACTIONS_DELETE_ACTION => GameIcons::Skull->value,
        PanelsIconAlias::ACTIONS_VIEW_ACTION => GameIcons::Eye->value,

        // Tables
        PanelsIconAlias::TABLES_SEARCH_FIELD => GameIcons::Search->value,
        PanelsIconAlias::TABLES_FILTER => GameIcons::Filter->value,

        // Global
        PanelsIconAlias::GLOBAL_SEARCH_FIELD => GameIcons::Search->value,
    ]);
}

๐ŸŽฎ Gaming-Specific Helpers

// RPG character creation helpers
$characterIcons = GameIcons::forRPGClasses();
$weaponsByType = GameIcons::weaponsByType();
$spellsBySchool = GameIcons::spellsBySchool();

// Board game helpers
$diceSet = GameIcons::getStandardDiceSet(); // D4, D6, D8, D10, D12, D20
$cardSuits = GameIcons::getCardSuits();
$gamepieces = GameIcons::getGamePieces();

๐Ÿ› ๏ธ Management Commands

๐Ÿ“ฅ Sync Command

Keep your icons up-to-date with the latest from game-icons.net:

# Sync icons (with backup)
php artisan sync:game-icons-enum

# Dry run (preview changes)
php artisan sync:game-icons-enum --dry-run

๐ŸŽจ Theming Examples

๐ŸŒ™ Dark Mode Support

// Automatic dark mode adaptation
IconColumn::make('status')
    ->icon(GameIcons::Heart->value)
    ->color('success')
    ->extraAttributes([
        'class' => 'dark:filter dark:brightness-110'
    ]);

๐ŸŽญ Custom Icon Themes

// Create themed icon sets
class ThemeManager
{
    public static function getFireTheme(): array
    {
        return [
            'primary' => GameIcons::Fire->value,
            'secondary' => GameIcons::Explosion->value,
            'accent' => GameIcons::Lightning->value,
            'background' => GameIcons::Flame->value,
        ];
    }

    public static function getIceTheme(): array
    {
        return [
            'primary' => GameIcons::Ice->value,
            'secondary' => GameIcons::Snowflake->value,
            'accent' => GameIcons::Crystal->value,
            'background' => GameIcons::Blizzard->value,
        ];
    }
}

๐Ÿงช Testing

Running Tests

# Run all tests
composer test

# Run with coverage
composer test-coverage

# Run specific test suite
./vendor/bin/pest --group=integration

# Run performance tests
./vendor/bin/pest --group=performance

๐ŸŽฏ Test Examples

<?php

use Alizharb\FilamentGameIcons\Enums\GameIcons;
use Alizharb\FilamentGameIcons\Tests\TestCase;

class GameIconsTest extends TestCase
{
    /** @test */
    public function it_can_get_icon_labels(): void
    {
        expect(GameIcons::Sword->getLabel())->toBe('Sword');
        expect(GameIcons::MagicSwirl->getLabel())->toBe('Magic Swirl');
    }

    /** @test */
    public function it_can_search_icons(): void
    {
        $results = GameIcons::search('sword');

        expect($results)->toContain(GameIcons::Sword);
        expect($results)->toContain(GameIcons::CrossedSwords);
    }

    /** @test */
    public function it_can_get_category_arrays(): void
    {
        $weapons = GameIcons::getWeaponsArray();

        expect($weapons)->toBeArray();
        expect($weapons)->toHaveKey(GameIcons::Sword->value);
        expect($weapons[GameIcons::Sword->value])->toBe('Sword');
    }
}

๐Ÿš€ Performance

โšก Optimization Features

  • Smart Caching: Icons are cached for maximum performance
  • Lazy Loading: Only loads icons when needed
  • SVG Optimization: Minified SVG files for faster loading
  • Bundle Splitting: Load only the categories you need

๐Ÿ”’ Security

๐Ÿ›ก๏ธ Security Features

  • โœ… XSS Protection: All icon names are sanitized
  • โœ… Path Traversal Prevention: Secure file handling
  • โœ… Input Validation: Strict type checking
  • โœ… No Executable Code: Pure SVG icons only

๐Ÿ” Security Testing

# Run security analysis
composer security-check

# Static analysis
./vendor/bin/phpstan analyse

# Code quality check
./vendor/bin/php-cs-fixer fix --dry-run

๐Ÿ”Œ Plugin Integration

๐ŸŽฏ Popular FilamentPHP Plugin Compatibility

Plugin Status Integration Example
Filament Tables โœ… Full Support IconColumn::make()->icon(GameIcons::Sword)
Filament Forms โœ… Full Support Select::make()->options(GameIcons::toSelectArray())
Filament Actions โœ… Full Support Action::make()->icon(GameIcons::Attack)
Filament Widgets โœ… Full Support Stat::make()->descriptionIcon(GameIcons::Trophy)
Filament Notifications โœ… Full Support Notification::make()->icon(GameIcons::Success)

๐Ÿ”— Third-party Integrations

// Spatie Media Library
use Spatie\MediaLibrary\HasMedia;

class Character extends Model implements HasMedia
{
    public function getAvatarIconAttribute(): string
    {
        return $this->class ? GameIcons::getClassIcon($this->class) : GameIcons::Person->value;
    }
}

๐Ÿš€ Migration Guide

โฌ†๏ธ From Heroicons to Game Icons

// Before (Heroicons)
Action::make('delete')
    ->icon('heroicon-o-trash')
    ->color('danger');

// After (Game Icons)
Action::make('delete')
    ->icon(GameIcons::Skull)
    ->color('danger');

๐Ÿค Contributing

We love contributions! Here's how you can help make this package even better:

๐ŸŽฏ Ways to Contribute

  • ๐Ÿ› Bug Reports: Found an issue? Report it here
  • ๐Ÿ’ก Feature Requests: Got an idea? Share it with us
  • ๐Ÿ“ Documentation: Help improve our docs
  • ๐Ÿงช Testing: Add more test cases
  • ๐ŸŽจ Icon Categories: Suggest new categorizations

๐Ÿ› ๏ธ Development Setup

# Clone the repository
git clone https://github.com/alizharb/filament-game-icons.git
cd filament-game-icons

# Install dependencies
composer install

# Set up testing environment
cp .env.example .env
php artisan key:generate

# Run tests
composer test

# Code quality checks
composer lint
composer analyse

๐Ÿ“‹ Contribution Guidelines

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

๐Ÿ“‹ Requirements

Requirement Version Status
PHP 8.1+ โœ…
Laravel 10.x / 11.x / 12.x โœ…
FilamentPHP 4.x โœ…
Blade Game Icons ^1.0 โœ… Auto-installed

๐Ÿ”ง Troubleshooting

โ“ Common Issues

Icons not displaying

Solution:

# Clear caches
php artisan cache:clear
php artisan view:clear

# Re-register assets
php artisan filament:assets

# Check if blade-game-icons is installed
composer show codeat3/blade-game-icons
IDE autocompletion not working

Solution:

# Generate IDE helper files
composer dump-autoload

# For PhpStorm users
php artisan ide-helper:generate
php artisan ide-helper:models
Performance issues with large icon sets

Solution:

// In your AppServiceProvider
public function boot(): void
{
    // Enable icon caching
    GameIcons::enableCaching();

    // Preload frequently used categories
    GameIcons::preload(['weapons', 'magic', 'characters']);
}

๐Ÿ“Š Statistics

๐Ÿ“ˆ Package Stats

GitHub stars GitHub forks GitHub watchers

๐ŸŽฎ Icon Collection

Total Icons Categories Weekly Downloads GitHub Stars
4,000+ 8 Major 1,000+ 50+

๐ŸŽ–๏ธ Showcase

๐Ÿ† Projects Using Filament Game Icons

Want your project featured here? Submit it!

๐Ÿ“š Resources

๐Ÿ“– Documentation & Guides

๐ŸŽฏ FilamentPHP Resources

๐ŸŽฎ Game Development

๐Ÿ“„ License & Attribution

๐Ÿ“œ Package License

This package is open-sourced software licensed under the MIT License.

๐ŸŽจ Game Icons License

The Game Icons used in this package are licensed under CC BY 3.0.

Required Attribution:

Icons made by various authors from
<a href="https://game-icons.net/">game-icons.net</a>, licensed under
<a href="https://creativecommons.org/licenses/by/3.0/">CC BY 3.0</a>

๐Ÿ™ Acknowledgments

๐Ÿ’ Special Thanks

Contributor Role Contribution
๐ŸŽจ Game Icons Icon Creators Amazing 4000+ icon collection
๐Ÿ”ง Blade Game Icons Laravel Integration Seamless Laravel blade integration
๐ŸŒŸ FilamentPHP Team Framework Outstanding admin panel framework
๐Ÿ‘ฅ Contributors Community Continuous improvements

๐Ÿ†˜ Support

๐Ÿ’ฌ Get Help

Support Channel Response Time Best For
๐Ÿ› GitHub Issues 24-48 hours Bug reports, feature requests
๐Ÿ’ฌ GitHub Discussions 12-24 hours Questions, ideas, showcase
๐ŸŒŸ FilamentPHP Discord Real-time Community support
๐Ÿ“ง Email Support 48-72 hours Private/commercial inquiries

๐Ÿ“ Before Reporting Issues

  1. โœ… Check existing issues
  2. โœ… Read the documentation
  3. โœ… Try the troubleshooting guide
  4. โœ… Provide clear reproduction steps

๐Ÿ’ก Pro Tips

๐ŸŽฏ Best Practices

// โœ… DO: Use enum constants for type safety
Action::make('attack')->icon(GameIcons::Sword);

// โŒ DON'T: Use magic strings
Action::make('attack')->icon('gameicon-sword');

// โœ… DO: Group related icons
$combatIcons = [
    GameIcons::Sword,
    GameIcons::Shield,
    GameIcons::Armor,
];

// โœ… DO: Use descriptive variable names
$healingSpellIcon = GameIcons::HealingPotion;
$attackSpellIcon = GameIcons::Lightning;

โšก Performance Tips

// Cache frequently used icon arrays
class IconCache
{
    private static array $weaponCache = [];

    public static function getWeapons(): array
    {
        return self::$weaponCache ??= GameIcons::getWeaponsArray();
    }
}

// Preload icons for better performance
public function boot(): void
{
    GameIcons::preload(['weapons', 'magic', 'characters']);
}

๐Ÿ”— Related Packages

๐ŸŽฎ Ecosystem

๐ŸŒŸ Star History

Star History Chart

๐Ÿ’ Show Your Support

If this package helped you build something awesome, consider:

Sponsor

โญ Star this repository
๐Ÿฆ Share on Twitter
๐Ÿ“ Write a blog post
๐Ÿ—ฃ๏ธ Tell your friends

Made with โค๏ธ and โ˜• for the FilamentPHP community

โญ Star โ€ข ๐Ÿด Fork โ€ข ๐Ÿ› Issues โ€ข ๐Ÿ’ฌ Discussions โ€ข ๐Ÿ“š Wiki

Built by Ali Harb โ€ข Powered by FilamentPHP โ€ข Icons from Game Icons