From 580ca9d569407430a7d11782e6fbda78e7a2dcbc Mon Sep 17 00:00:00 2001 From: dhanabalan Date: Sat, 31 May 2025 10:18:56 +0530 Subject: [PATCH] Added Row Number on productionLineStop exporter --- app/Filament/Exports/ProductionLineStopExporter.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/app/Filament/Exports/ProductionLineStopExporter.php b/app/Filament/Exports/ProductionLineStopExporter.php index df16061..87e538f 100644 --- a/app/Filament/Exports/ProductionLineStopExporter.php +++ b/app/Filament/Exports/ProductionLineStopExporter.php @@ -13,9 +13,17 @@ class ProductionLineStopExporter extends Exporter public static function getColumns(): array { + static $rowNumber = 0; + return [ - ExportColumn::make('id') - ->label('ID'), + // ExportColumn::make('id') + // ->label('ID'), + ExportColumn::make('no') + ->label('NO') + ->state(function ($record) use (&$rowNumber) { + // Increment and return the row number + return ++$rowNumber; + }), ExportColumn::make('linestop.code') ->label('CODE'), ExportColumn::make('linestop.reason')