elmudo-dev/filament-select-table

This package is an extension of select to allow selecting from a table

Fund package maintenance!
Elmudo-Dev

Installs: 36

Dependents: 0

Suggesters: 0

Security: 0

Stars: 8

Watchers: 2

Forks: 1

Open Issues: 1

Language:Blade

1.0.1 2024-12-12 21:01 UTC

README

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

example.of.complement.mp4

This plugin is an extension of the field select and allows you to open a table selection to choose elements from a relationship.

Installation

You can install the package via composer:

composer require elmudo-dev/filament-select-table

Usage

FilamentSelectTable::make('reviewer3_id')
    ->live()
    ->label('Tests')
    ->multiple() // simple or multiple
    ->labelRelationshipAdd('label')
    ->titleRelationshipTable('Title')
    ->schema(TagsTableResource::class)
    ->relationship('tags', 'tag'),

Make TagsTableResource::class

<?php

namespace App\Filament\Resources\CourseResource;

use Filament\Tables\Columns\TextColumn;

class TagsTableResource
{
    public static function table(): array
    {

        return [
            TextColumn::make('id')->label('id')->searchable(),
            TextColumn::make('tag')->label('tag')->sortable(),
        ];

    }
}

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.