PHP code example of momenoor / filament-table-field

1. Go to this page and download the library: Download momenoor/filament-table-field 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/ */

    

momenoor / filament-table-field example snippets


\Momenoor\FilamentTableField\FilamentTableFieldServiceProvider::class,

use Momenoor\FilamentTableField\Forms\Components\TableField;

TableField::make('tasks')
    ->relationship('tasks')
    ->tableColumns([
        TextColumn::make('name'),
        TextColumn::make('status')->badge(),
    ])
    ->createFormSchema([
        TextInput::make('name')->
    ])
    ->beforeUpdateRecord(fn ($record) => [
        'updated_by' => auth()->id(),
    ])
    ->heading('Task Assignments')
    ->defaultRecordDefaults([
        'status' => 'new'
    ])
    ->disableEdit(false)
    ->disableDelete(false);