54 lines
1.2 KiB
PHP
54 lines
1.2 KiB
PHP
<?php
|
|
|
|
namespace App\Exports;
|
|
|
|
use Maatwebsite\Excel\Concerns\FromCollection;
|
|
use Maatwebsite\Excel\Concerns\Exportable;
|
|
use Maatwebsite\Excel\Concerns\FromQuery;
|
|
// use Maatwebsite\Excel\Concerns\WithMapping;
|
|
use Maatwebsite\Excel\Concerns\WithHeadings;
|
|
use App\Models\kycuserdetail;
|
|
|
|
|
|
class ManageKycExport implements FromCollection , WithHeadings
|
|
{
|
|
/**
|
|
* @return \Illuminate\Support\Collection
|
|
*/
|
|
public function collection()
|
|
{
|
|
$userData = kycuserdetail::select('id','user_id','firstName','lastName','address','email','pan_number','DOB',
|
|
'mob_number',
|
|
'age',
|
|
'occupation',
|
|
'gender',
|
|
'residential_status',
|
|
'life_expectancy',
|
|
'isActive',
|
|
'isDelete')
|
|
->get();
|
|
|
|
return $userData;
|
|
}
|
|
|
|
public function headings(): array {
|
|
return [
|
|
'id','user_id',
|
|
'firstName',
|
|
'lastName',
|
|
'address',
|
|
'email',
|
|
'pan_number',
|
|
'DOB',
|
|
'mob_number',
|
|
'age',
|
|
'occupation',
|
|
'gender',
|
|
'residential_status',
|
|
'life_expectancy',
|
|
'isActive',
|
|
'isDelete',
|
|
];
|
|
}
|
|
}
|