diff --git a/.cursor/rules/laravel-boost.mdc b/.cursor/rules/laravel-boost.mdc index dcac8e3..161c9db 100644 --- a/.cursor/rules/laravel-boost.mdc +++ b/.cursor/rules/laravel-boost.mdc @@ -657,7 +657,7 @@ Forms\Components\Select::make('user_id') - All action classes extend `Filament\Actions\Action`. No action classes exist in `Filament\Tables\Actions`. - The `Form` & `Infolist` layout components have been moved to `Filament\Schemas\Components`, for example `Grid`, `Section`, `Fieldset`, `Tabs`, `Wizard`, etc. - A new `Repeater` component for Forms has been added. -- Icons now use the `Filament\Support\Icons\Heroicon` Enum by default. Other options are available and documented. +- Icons now use the `CodeWithDennis\FilamentLucideIcons\Enums\LucideIcon` Enum by default. Other options are available and documented. ### Organize Component Classes Structure - Schema components: `Schemas/Components/` diff --git a/app/Filament/Pages/Dashboard.php b/app/Filament/Pages/Dashboard.php new file mode 100644 index 0000000..cedfda1 --- /dev/null +++ b/app/Filament/Pages/Dashboard.php @@ -0,0 +1,10 @@ +tooltip(fn (User $user) => $user->hasVerifiedEmail() ? 'Email Verified' : 'Email Not Verified') ->icon(fn (User $user) => match ($user->hasVerifiedEmail()) { - true => Heroicon::OutlinedCheckCircle, - false => Heroicon::OutlinedXCircle, + true => LucideIcon::CircleCheck, + false => LucideIcon::XCircle, }) ->iconColor(fn (User $user) => match ($user->hasVerifiedEmail()) { true => 'success', diff --git a/app/Filament/Resources/Users/UserResource.php b/app/Filament/Resources/Users/UserResource.php index cc37390..4c67565 100644 --- a/app/Filament/Resources/Users/UserResource.php +++ b/app/Filament/Resources/Users/UserResource.php @@ -8,6 +8,7 @@ use App\Filament\Resources\Users\Schemas\UserForm; use App\Filament\Resources\Users\Tables\UsersTable; use App\Models\User; +use CodeWithDennis\FilamentLucideIcons\Enums\LucideIcon; use Filament\Resources\Resource; use Filament\Schemas\Schema; use Filament\Tables\Table; @@ -17,7 +18,7 @@ class UserResource extends Resource { protected static ?string $model = User::class; - protected static string|\BackedEnum|null $navigationIcon = 'heroicon-o-users'; + protected static string|\BackedEnum|null $navigationIcon = LucideIcon::Users; protected static ?string $recordTitleAttribute = 'email'; diff --git a/app/Providers/Filament/AdminPanelProvider.php b/app/Providers/Filament/AdminPanelProvider.php index 3d6fc88..5a343c0 100644 --- a/app/Providers/Filament/AdminPanelProvider.php +++ b/app/Providers/Filament/AdminPanelProvider.php @@ -3,10 +3,10 @@ namespace App\Providers\Filament; use App\Filament\Pages\Auth\Login; +use App\Filament\Pages\Dashboard; use Filament\Http\Middleware\Authenticate; use Filament\Http\Middleware\DisableBladeIconComponents; use Filament\Http\Middleware\DispatchServingFilamentEvent; -use Filament\Pages\Dashboard; use Filament\Panel; use Filament\PanelProvider; use Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse; diff --git a/composer.json b/composer.json index 2c4ebfc..b46729d 100644 --- a/composer.json +++ b/composer.json @@ -5,6 +5,7 @@ "license": "MIT", "require": { "php": "^8.4", + "codewithdennis/filament-lucide-icons": "^4.0", "filament/filament": "^4.0", "inertiajs/inertia-laravel": "^2.0", "laravel/framework": "^12.0", diff --git a/composer.lock b/composer.lock index 1e273e0..bc9e379 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "d70fba2179864b02ec42bbbed0e24750", + "content-hash": "f69c65d633aa89d4a192c1f0e1f52191", "packages": [ { "name": "anourvalar/eloquent-serialize", @@ -510,6 +510,75 @@ ], "time": "2024-07-16T11:13:48+00:00" }, + { + "name": "codewithdennis/filament-lucide-icons", + "version": "v4.0.0", + "source": { + "type": "git", + "url": "https://github.com/CodeWithDennis/filament-lucide-icons.git", + "reference": "8638285048070085492fd4288fbcc4a09f88f8ba" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/CodeWithDennis/filament-lucide-icons/zipball/8638285048070085492fd4288fbcc4a09f88f8ba", + "reference": "8638285048070085492fd4288fbcc4a09f88f8ba", + "shasum": "" + }, + "require": { + "filament/filament": "^4.0", + "php": "^8.2", + "spatie/laravel-package-tools": "^1.15.0", + "technikermathe/blade-lucide-icons": "3.113.0" + }, + "require-dev": { + "laravel/pint": "^1.22" + }, + "type": "library", + "extra": { + "laravel": { + "aliases": { + "FilamentLucideIcons": "CodeWithDennis\\FilamentLucideIcons\\Facades\\FilamentLucideIcons" + }, + "providers": [ + "CodeWithDennis\\FilamentLucideIcons\\FilamentLucideIconsServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "CodeWithDennis\\FilamentLucideIcons\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "CodeWithDennis", + "role": "Developer" + } + ], + "description": "A Filament plugin that integrates Lucide icons, allowing you to use them seamlessly across Filament forms, tables, actions, and more.", + "homepage": "https://github.com/codewithdennis/filament-lucide-icons", + "keywords": [ + "filamentphp", + "icons", + "laravel", + "lucide" + ], + "support": { + "issues": "https://github.com/codewithdennis/filament-lucide-icons/issues", + "source": "https://github.com/codewithdennis/filament-lucide-icons" + }, + "funding": [ + { + "url": "https://github.com/CodeWithDennis", + "type": "github" + } + ], + "time": "2025-07-10T12:30:10+00:00" + }, { "name": "composer/semver", "version": "3.4.4", @@ -9073,6 +9142,71 @@ ], "time": "2025-10-27T20:36:44+00:00" }, + { + "name": "technikermathe/blade-lucide-icons", + "version": "v3.113.0", + "source": { + "type": "git", + "url": "https://github.com/PascaleBeier/blade-lucide-icons.git", + "reference": "8c49cb1b55cce625de11ad05757630d0ea16822b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PascaleBeier/blade-lucide-icons/zipball/8c49cb1b55cce625de11ad05757630d0ea16822b", + "reference": "8c49cb1b55cce625de11ad05757630d0ea16822b", + "shasum": "" + }, + "require": { + "blade-ui-kit/blade-icons": "^1.6", + "illuminate/support": "^9.0|^10.0|^11.0|^12.0", + "php": "^8.1" + }, + "require-dev": { + "orchestra/testbench": "^7.0|^8.0|^9.0|^10.0", + "phpunit/phpunit": "^9.0|^10.0|^11.0", + "spatie/phpunit-snapshot-assertions": "^4.2.14|^5.0|^6.0" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Technikermathe\\LucideIcons\\BladeLucideIconsServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "Technikermathe\\LucideIcons\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Dan Pock", + "role": "Original Developer" + }, + { + "name": "Pascale Beier", + "role": "Developer" + } + ], + "description": "A package to easily make use of Lucide icons in your Laravel Blade views.", + "homepage": "https://github.com/technikermathe/blade-lucide-icons", + "keywords": [ + "Heroicons", + "LucideIcons", + "blade", + "laravel" + ], + "support": { + "issues": "https://github.com/PascaleBeier/blade-lucide-icons/issues", + "source": "https://github.com/PascaleBeier/blade-lucide-icons/tree/v3.113.0" + }, + "time": "2025-06-28T00:06:57+00:00" + }, { "name": "tijsverkoyen/css-to-inline-styles", "version": "v2.3.0",