PHP code example of ptplugins / filament-collapsible-column-group
1. Go to this page and download the library: Download ptplugins/filament-collapsible-column-group 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/ */
ptplugins / filament-collapsible-column-group example snippets
use PtPlugins\FilamentCollapsibleColumnGroup\CollapsibleColumnGroup;
use Filament\Tables\Columns\TextColumn;
public function table(Table $table): Table
{
return $table->columns([
TextColumn::make('name'),
CollapsibleColumnGroup::make('Q1')
->collapsible()
->columns([
TextColumn::make('jan'),
TextColumn::make('feb'),
TextColumn::make('mar'),
]),
CollapsibleColumnGroup::make('Q2')
->collapsible(collapsedByDefault: true) // starts folded
->columns([
TextColumn::make('apr'),
TextColumn::make('may'),
TextColumn::make('jun'),
]),
]);
}