PHP code example of awcodes / filament-table-repeater

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

    

awcodes / filament-table-repeater example snippets


use Awcodes\TableRepeater\Components\TableRepeater;
use Awcodes\TableRepeater\Header;

TableRepeater::make('users')
     ->headers([
        Header::make('name')->width('150px'),
    ])
    ->schema([
        ...
    ])
    ->columnSpan('full')

use Awcodes\TableRepeater\Header;

TableRepeater::make('users')
    ->headers([
        Header::make('name'),
        Header::make('email'),
    ])

use Filament\Support\Enums\Alignment;

Header::make('name')
    ->align(Alignment::Center)

Header::make('name')
    ->width('150px')

Header::make('name')
    ->markAsRequired()

TableRepeater::make('users')
    ->headers(...)
    ->renderHeader(false)

TableRepeater::make('users')
    ->showLabels()

TableRepeater::make('users')
    ->emptyLabel('There are no users registered.')

use Filament\Support\Enums\MaxWidth;

TableRepeater::make('users')
    ->stackAt(MaxWidth::Medium)

TableRepeater::make('users')
    ->streamlined()

TableRepeater::make('users')
    ->extraActions([
        Action::make('exportData')
            ->icon('heroicon-m-inbox-arrow-down')
            ->action(function (TableRepeater $component): void {
                Notification::make('export_data')
                    ->success()
                    ->title('Data exported.')
                    ->send();
            }),
    ])
js
content: [
    '<path-to-vendor>/awcodes/filament-table-repeater/resources/**/*.blade.php',
]