Linux server.jmdstrack.com 3.10.0-1160.119.1.el7.tuxcare.els10.x86_64 #1 SMP Fri Oct 11 21:40:41 UTC 2024 x86_64
/ home/ jmdstrac/ public_html/ sabc/ app/ Exports/ |
|
<?php namespace App\Exports; use App\Position; use App\User; use Illuminate\Support\Facades\DB; use Maatwebsite\Excel\Concerns\FromCollection; use Maatwebsite\Excel\Concerns\WithHeadings; use Maatwebsite\Excel\Concerns\WithCustomCsvSettings; class Exporte implements FromCollection, WithHeadings, WithCustomCsvSettings { /** * @return \Illuminate\Support\Collection */ public function collection() { $collect = collect(DB::table('reports') ->select('cdt','ludt','creation_user','modification_user','asset','vehicle','poi','PoiName','isPOI','count') ->orderBy('cdt','asc') ->get()); return $collect; } public function headings(): array { return [ 'cdt', 'ludt', 'creation_user', 'modification_user', 'asset', 'vehicle', 'poi', 'PoiName', 'isPOI', 'count', ]; } public function getCsvSettings(): array { return [ 'delimiter' => ' ', 'enclosure' => '' ]; } }