Closed AlexHaible closed 3 years ago
@AlexHaible The issue here is the syntax you're using inside of options()
. You'll want to do something like this:
Columns\Icon::make('status')
->options([
'bi-phone-landscape' => fn ($status) => $status == '0'
])
The documentation for the column is actually incorrect. I'll open an issue on the documentation repo and we'll get this sorted.
That'd explain why it didn't work as I copied it straight from the documentation. Well, glad I could help find that issue.
This has now been fixed in the docs 👍
Describe the bug Filament doesn't seem to recognize additional icon packs installed, despite the pack being supported by Blade Icons, which from what I could see is what handles Heroicons as well.
To reproduce
Columns\Icon::make('status')->options([ '0' => 'bi-phone-landscape', '1' => 'bi-phone', '2' => 'bi-square', ]),
Expected behavior Expected icons to be showed depending on value from database.
Code
Error Call to undefined function bi-phone-landscape() (View: /Users/user/Laravel/project/vendor/filament/filament/packages/tables/resources/views/cells/icon.blade.php)
Context