You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

33 lines
736 B

<?php
namespace App\Exports;
use App\Models\Prestamo;
use Maatwebsite\Excel\Concerns\FromCollection;
use Maatwebsite\Excel\Concerns\WithHeadings;
class PrestamosExport implements FromCollection, WithHeadings
{
public function collection()
{
return Prestamo::where('eliminado', 0)->get();
}
public function headings(): array
{
return [
'ID',
'Nombre Solicitante',
'Destino',
'Fecha y Hora Salida',
'Fecha y Hora Llegada',
'Motivo',
'Domicilio',
'Número de Personas',
'Chofer',
'Estado',
'Fecha de Creación',
'Última Actualización'
];
}
}