Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laravel Livewire Tables Laravel Package

rappasoft/laravel-livewire-tables

Laravel Livewire Tables provides dynamic, feature-rich data tables for Laravel Livewire with sorting, searching, filtering, pagination, bulk actions, and Bootstrap/Tailwind support. Build reusable table components backed by Eloquent queries.

View on GitHub
Deep Wiki
Context7

title: Icon Columns (beta) weight: 10

Icon columns provide a way to display icons in your table without having to use format() or partial views.

setIcon

setIcon requires a valid path to an SVG (Directly or via a Library), it receives the $row, and $value (if available) to help you customise which icon to use

IconColumn::make('Icon', 'status')
    ->setIcon(function ($row, $value) { 
        if($value == 1) { 
            return "heroicon-o-check-circle"; 
        } 
        else 
        {
            return "heroicon-o-x-circle"; 
        } 
    }),

attributes

Attributes receives the $row, and $value (if available) to help you customise which attributes to apply, you may pass both classes, and other SVG specific attributes.

IconColumn::make('Icon', 'status')
    ->setIcon(function ($row, $value) { if($value == 1) { return "heroicon-o-check-circle"; } else { return "heroicon-o-x-circle"; } })
    ->attributes(function ($row, $value) { 
        if($value == 1) { 
            return [
                'class' => 'w-6 h-6', 
                'stroke' => '#008000'
            ]; 
        } 
        else 
        {
            return [
                'class' => 'w-3 h-3', 
                'stroke' => '#FF0000'
            ]; 
        } 
    }),

For example:

Example

IconColumn::make('Icon', 'status')
    ->setIcon(function ($row, $value) { if($value == 1) { return "heroicon-o-check-circle"; } else { return "heroicon-o-x-circle"; } })
    ->attributes(function ($row, $value) { 
        if($value == 3) { 
            return [
                'class' => 'w-3 h-3', 
                'stroke' => '#008000'
            ]; 
        } 
        else if($value == 2) { 
            return [
                'class' => 'w-3 h-3', 
                'stroke' => '#0000FF'
            ]; 
        } 
        else 
        {
            return [
                'class' => 'w-3 h-3', 
                'stroke' => '#FF0000'
            ]; 
        } 
    }),

Please also see the following for other available methods:

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport
twbs/bootstrap4