mirror of
https://github.com/Bigherollc/wticreatorstudio.git
synced 2026-01-16 19:05:08 -05:00
70 lines
1.7 KiB
PHP
70 lines
1.7 KiB
PHP
<?php
|
|
|
|
namespace Modules\StudioPlus\Exports;
|
|
|
|
use Maatwebsite\Excel\Events\AfterSheet;
|
|
use Maatwebsite\Excel\Concerns\WithEvents;
|
|
use Maatwebsite\Excel\Concerns\WithHeadings;
|
|
use Maatwebsite\Excel\Concerns\FromCollection;
|
|
use Maatwebsite\Excel\Concerns\ShouldAutoSize;
|
|
use Modules\StudioPlus\Entities\StudioPlusVideo;
|
|
|
|
class UsersExport implements
|
|
FromCollection,
|
|
ShouldAutoSize,
|
|
WithHeadings,
|
|
WithEvents
|
|
|
|
{
|
|
|
|
public function collection()
|
|
{
|
|
return StudioPlusVideo::with(['channel.user'])->get();
|
|
}
|
|
|
|
public function headings(): array
|
|
{
|
|
return [
|
|
'id',
|
|
'studio_plus_channel_id',
|
|
'studio_plus_category_id',
|
|
'job_request_id',
|
|
'title',
|
|
'description',
|
|
'video_url',
|
|
'original_video_url',
|
|
'video_duration',
|
|
'filename',
|
|
'schedule_to_publish',
|
|
'visibility',
|
|
'types',
|
|
'status',
|
|
'created_at',
|
|
'updated_at',
|
|
'studio_plus_asin_id',
|
|
'asin',
|
|
'product_name',
|
|
'amazon_url',
|
|
'upload_status',
|
|
'amazon_total_reviews',
|
|
'global_setting_id',
|
|
'is_short',
|
|
'brand',
|
|
|
|
];
|
|
}
|
|
public function registerEvents(): array
|
|
{
|
|
return [
|
|
AfterSheet::class => function (AfterSheet $event) {
|
|
$event->sheet
|
|
->getStyle('A1:BA1')->applyFromArray([
|
|
'font' => [
|
|
'bold' => true
|
|
]
|
|
]);
|
|
},
|
|
];
|
|
}
|
|
}
|