/home/techb158/dev.balacoffee.com/app/Exports
NameSizeModeActions
AdjustmentsExport.php25630644editdlrm
ClientsExport.php20860644editdlrm
ExpenseExport.php27490644editdlrm
Payment_Purchase_Export.php27430644editdlrm
Payment_Purchase_Return_Export.php27860644editdlrm
Payment_Sale_Export.php27050644editdlrm
Payment_Sale_Return_Export.php27540644editdlrm
ProductsExport.php27530644editdlrm
ProvidersExport.php20830644editdlrm
PurchasesExport.php29350644editdlrm
Purchase_Return.php29650644editdlrm
QuotationsExport.php27350644editdlrm
SalesExport.php30690644editdlrm
Sale_Return.php28990644editdlrm
ShipmentsExport.php24120644editdlrm
TransfersExport.php27730644editdlrm
UsersExport.php25260644editdlrm
Edit: /home/techb158/dev.balacoffee.com/app/Exports/ClientsExport.php (2086B)
orderBy('id', 'DESC')->get(); if ($clients->isNotEmpty()) { foreach ($clients as $client) { $item['code'] = $client->code; $item['name'] = $client->name; $item['email'] = $client->email; $item['phone'] = $client->phone; $item['adresse'] = substr($client->adresse, 0, 20); $data[] = $item; } } else { $data = []; } return $data; } public function registerEvents(): array { return [ AfterSheet::class => function (AfterSheet $event) { $cellRange = 'A1:E1'; // All headers $event->sheet->getDelegate()->getStyle($cellRange)->getFont()->setSize(14); $styleArray = [ 'borders' => [ 'outline' => [ 'borderStyle' => \PhpOffice\PhpSpreadsheet\Style\Border::BORDER_THICK, 'color' => ['argb' => 'FFFF0000'], ], ], 'alignment' => [ 'horizontal' => \PhpOffice\PhpSpreadsheet\Style\Alignment::HORIZONTAL_RIGHT, ], ]; }, ]; } public function headings(): array { return [ 'Code', 'Name', 'Email', 'Phone', 'Adresse', ]; } }