Sindbad~EG File Manager
<?php
namespace App\Filament\Exports;
use App\Models\Adjustment;
use Filament\Actions\Exports\ExportColumn;
use Filament\Actions\Exports\Exporter;
use Filament\Actions\Exports\Models\Export;
class AdjustmentExporter extends Exporter
{
protected static ?string $model = Adjustment::class;
protected static ?string $disk = 'local';
protected static ?string $directory = 'filament/exports/adjustment';
public static function getColumns(): array
{
return [
//
ExportColumn::make('no_inv')->label('No Invoice'),
ExportColumn::make('tgl_inv')->label('Tanggal'),
ExportColumn::make('kode_brg')->label('Kode Barang'),
ExportColumn::make('nama_barang')->label('Nama Barang'),
ExportColumn::make('type')->label('Type'),
ExportColumn::make('quantity')->label('Qty'),
ExportColumn::make('satuan')->label('Satuan'),
ExportColumn::make('harga')->label('Harga'),
];
}
public static function getCompletedNotificationBody(Export $export): string
{
$body = 'Your adjustment export has completed and ' . number_format($export->successful_rows) . ' ' . str('row')->plural($export->successful_rows) . ' exported.';
if ($failedRowsCount = $export->getFailedRowsCount()) {
$body .= ' ' . number_format($failedRowsCount) . ' ' . str('row')->plural($failedRowsCount) . ' failed to export.';
}
return $body;
}
}
Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists