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

46 lines
849 B
PHP

<?php
namespace App\Exports;
use App\Models\Models\FangOwner;
use App\Models\UserOrder;
use http\Client\Curl\User;
use Illuminate\Support\Facades\DB;
use Maatwebsite\Excel\Concerns\FromCollection;
use Maatwebsite\Excel\Concerns\WithHeadings;
use Maatwebsite\Excel\Concerns\WithMapping;
class FangOwnerExport implements FromCollection,WithHeadings
{
protected $param;
public function __construct($param)
{
$this->param = $param;
}
// public function map($row): array
// {
// return [
//// $row->date,
//// $row->type,
// // 添加更多列映射...
// ];
// }
public function headings(): array
{
return [
'日期',
'类型(1个检2团检)',
'数量',
'金额',
];
}
public function collection()
{
//创建一个对象
return $this->param ;
}
}