1
0

提交代码

This commit is contained in:
2020-08-06 14:45:56 +08:00
commit 9d0d5f4be9
361 changed files with 36445 additions and 0 deletions

View File

@@ -0,0 +1,39 @@
<?php
namespace App\Admin\Exporters;
use Encore\Admin\Grid\Exporters\ExcelExporter;
use Maatwebsite\Excel\Concerns\WithMapping;
class CashOutExport extends ExcelExporter implements WithMapping
{
protected $fileName = '提现用户.xlsx';
protected $columns = [
'id' => '序号',
'user_id' => '用户ID',
'user.username' => '用户账号',
'user.info.nickname' => '用户昵称',
'cash_account_no' => '支付宝账户',
'variable' => '提现金额',
'state' => '提现状态',
'created_at' => '提现时间',
];
public function map($info): array
{
$data = [
'id' => $info->id,
'user_id' => $info->user_id,
'user.username' => ' ' . $info->user->username,
'user.info.nickname' => ' ' . $info->user->info->nickname,
'cash_account_no' => ' ' . $info->cash_account_no,
'variable' => ' ' . $info->variable,
'state' => $info->state_text,
'created_at' => $info->created_at,
];
return $data;
}
}