Files
ahrommag/app/Exports/BlogImagesExport.php
2025-11-16 12:43:07 +03:30

33 lines
586 B
PHP

<?php
namespace App\Exports;
use Illuminate\Support\Collection;
use Maatwebsite\Excel\Concerns\FromCollection;
use Maatwebsite\Excel\Concerns\WithHeadings;
class BlogImagesExport implements FromCollection, WithHeadings
{
protected $data;
public function __construct(Collection $data)
{
$this->data = $data;
}
public function collection()
{
return $this->data;
}
public function headings(): array
{
return [
'Blog ID',
'Image Source',
'Width',
'Height',
];
}
}