PHP code example of dvarilek / filament-table-select
1. Go to this page and download the library: Download dvarilek/filament-table-select library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
dvarilek / filament-table-select example snippets
use Dvarilek\FilamentTableSelect\Components\Form\TableSelect;
$form
->schema([
TableSelect::make('clients')
->relationship('clients', 'name')
])
use Dvarilek\FilamentTableSelect\Components\Form\TableSelect;
$form
->schema([
TableSelect::make('clients')
->relationship('clients', 'name')
->multiple()
])
use Dvarilek\FilamentTableSelect\Components\Form\TableSelect;
TableSelect::make('clients')
->relationship('clients', 'name')
->
use Dvarilek\FilamentTableSelect\Components\Form\TableSelect;
TableSelect::make('clients')
->relationship('clients', 'name')
->
->
use Dvarilek\FilamentTableSelect\Components\Form\TableSelect;
use Dvarilek\FilamentTableSelect\Enums\SelectionModalActionPosition;
TableSelect::make('clients')
->relationship('clients', 'name')
->
use Dvarilek\FilamentTableSelect\Enums\SelectionModalActionPosition;
->
use Dvarilek\FilamentTableSelect\Components\Form\TableSelect;
TableSelect::make('clients')
->relationship('clients', 'name')
->createOptionForm(ClientResource::form(...))
->createOptionUsing(function (array $data) {
// Create related record using...
})
->createOptionAction(function () {
// Configure the action...
})
use Dvarilek\FilamentTableSelect\Components\Form\TableSelect;
use Dvarilek\FilamentTableSelect\Enums\SelectionModalActionPosition;
use Filament\Forms\Form;
TableSelect::make('clients')
->relationship('clients', 'name')
->createOptionForm(fn (Form $form) => ClientResource::form($form))
->createOptionActionPosition(SelectionModalActionPosition::TOP_LEFT)
use Dvarilek\FilamentTableSelect\Components\Form\TableSelect;
public function boot(): void
{
TableSelect::configureUsing(static function (TableSelect $tableSelect): void {
$tableSelect->
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.