### Installing Filament Table Repeater via Composer Source: https://github.com/awcodes/filament-table-repeater/blob/3.x/README.md This snippet demonstrates how to install the Filament Table Repeater plugin using Composer, which is the standard dependency manager for PHP. This command adds the package to your project's `composer.json` and downloads its dependencies. ```bash composer require awcodes/filament-table-repeater ``` -------------------------------- ### Enabling Streamlined Appearance for Table Repeater in PHP Source: https://github.com/awcodes/filament-table-repeater/blob/3.x/README.md This PHP example shows how to change the visual appearance of the `TableRepeater` to be more inline with the table structure using the `streamlined()` method. This provides a more compact and integrated look for the fields. ```php TableRepeater::make('users') ->streamlined() ``` -------------------------------- ### Configuring Multiple Headers for Table Repeater in PHP Source: https://github.com/awcodes/filament-table-repeater/blob/3.x/README.md This PHP example demonstrates how to add multiple `Header` components to the `TableRepeater` using the `headers()` method. This allows for defining distinct columns such as 'name' and 'email' for the table. ```php use Awcodes\TableRepeater\Header; TableRepeater::make('users') ->headers([ Header::make('name'), Header::make('email'), ]) ``` -------------------------------- ### Setting Table Repeater Header Width in PHP Source: https://github.com/awcodes/filament-table-repeater/blob/3.x/README.md This PHP example demonstrates how to set a fixed width for a table header using the `width()` method of the `Header` component. This helps in controlling the layout and visual presentation of columns within the table. ```php Header::make('name') ->width('150px') ``` -------------------------------- ### Hiding Table Repeater Header in PHP Source: https://github.com/awcodes/filament-table-repeater/blob/3.x/README.md This PHP example shows how to hide the visual rendering of the table header while still including it for accessibility purposes. The `renderHeader(false)` method on the `TableRepeater` component controls this visibility. ```php TableRepeater::make('users') ->headers(...) ->renderHeader(false) ``` -------------------------------- ### Customizing Empty State Label for Table Repeater in PHP Source: https://github.com/awcodes/filament-table-repeater/blob/3.x/README.md This PHP example shows how to customize the text displayed when the `TableRepeater` is empty using the `emptyLabel()` method. It allows providing a custom message or hiding the label entirely by passing `false`. ```php TableRepeater::make('users') ->emptyLabel('There are no users registered.') ``` -------------------------------- ### Defining a Basic Table Repeater with Headers in PHP Source: https://github.com/awcodes/filament-table-repeater/blob/3.x/README.md This PHP snippet illustrates the fundamental usage of the `TableRepeater` component, demonstrating how to define a table with a `users` field and specify initial headers like 'name'. It also shows how to set the column span to full width. ```php use Awcodes\TableRepeater\Components\TableRepeater; use Awcodes\TableRepeater\Header; TableRepeater::make('users') ->headers([ Header::make('name')->width('150px'), ]) ->schema([ ... ]) ->columnSpan('full') ``` -------------------------------- ### Setting Table Repeater Breakpoint for Mobile Display in PHP Source: https://github.com/awcodes/filament-table-repeater/blob/3.x/README.md This PHP snippet demonstrates how to set the breakpoint at which the `TableRepeater` will switch to a panel-like display on mobile devices using the `stackAt()` method. It accepts a `MaxWidth` enum value to control responsiveness. ```php use Filament\Support\Enums\MaxWidth; TableRepeater::make('users') ->stackAt(MaxWidth::Medium) ``` -------------------------------- ### Importing Table Repeater Plugin Stylesheet in CSS Source: https://github.com/awcodes/filament-table-repeater/blob/3.x/README.md This CSS snippet shows how to import the plugin's stylesheet into your custom Filament theme's CSS file. This step is crucial for applying the correct styling and ensuring the plugin's visual components render properly. ```css @import '/awcodes/filament-table-repeater/resources/css/plugin.css'; ``` -------------------------------- ### Configuring Tailwind CSS for Table Repeater Views Source: https://github.com/awcodes/filament-table-repeater/blob/3.x/README.md This JavaScript snippet, used within a `tailwind.config.js` file, adds the plugin's Blade views to Tailwind CSS's content array. This ensures that Tailwind scans the plugin's templates for classes and includes them in the compiled CSS, enabling proper styling. ```js content: [ '/awcodes/filament-table-repeater/resources/**/*.blade.php', ] ``` -------------------------------- ### Adding Extra Actions Below Table Repeater in PHP Source: https://github.com/awcodes/filament-table-repeater/blob/3.x/README.md This PHP snippet demonstrates how to add custom actions below the `TableRepeater` using the `extraActions()` method. These actions appear next to or in place of the 'Add' button and can trigger custom logic, such as notifications. ```php 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(); }), ]) ``` -------------------------------- ### Marking Table Repeater Columns as Required in PHP Source: https://github.com/awcodes/filament-table-repeater/blob/3.x/README.md This PHP snippet illustrates how to mark a table column as required using the `markAsRequired()` method on a `Header` component. This visually indicates to the user that the corresponding field in the column is mandatory. ```php Header::make('name') ->markAsRequired() ``` -------------------------------- ### Displaying Form Component Labels in Table Repeater in PHP Source: https://github.com/awcodes/filament-table-repeater/blob/3.x/README.md This PHP snippet demonstrates how to make form component labels visible within the `TableRepeater` using the `showLabels()` method. By default, these labels are hidden, so this method is used to explicitly display them. ```php TableRepeater::make('users') ->showLabels() ``` -------------------------------- ### Aligning Table Repeater Headers in PHP Source: https://github.com/awcodes/filament-table-repeater/blob/3.x/README.md This PHP snippet shows how to align a table header using the `align()` method of the `Header` component, accepting a Filament `Alignment` enum value. This allows for precise control over the text alignment within a column header. ```php use Filament\Support\Enums\Alignment; Header::make('name') ->align(Alignment::Center) ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.