uawdijnntqw1x1x1
IP : 216.73.216.93
Hostname : panel.codeskitter.com
Kernel : Linux panel.codeskitter.com 6.8.0-100-generic #100-Ubuntu SMP PREEMPT_DYNAMIC Tue Jan 13 16:40:06 UTC 2026 x86_64
Disable Function : apache_child_terminate, apache_note, apache_setenv, define_syslog_variables, dl, link, opcache_get_status, openlog, pcntl_exec, pcntl_fork, pcntl_setpriority, popen, posix_getpwuid, posix_kill, posix_mkfifo, posix_setpgid, posix_setsid, posix_setuid
OS : Linux
PATH:
/
home
/
users
/
unlimited
/
www
/
admin.brosiper.codeskitter.site
/
app
/
Exports
/
StoreItemExport.php
/
/
<?php namespace App\Exports; use Illuminate\Contracts\View\View; use Illuminate\Support\Facades\Config; use Maatwebsite\Excel\Concerns\FromView; use Maatwebsite\Excel\Events\AfterSheet; use Maatwebsite\Excel\Concerns\Exportable; use Maatwebsite\Excel\Concerns\WithEvents; use Maatwebsite\Excel\Concerns\WithStyles; use PhpOffice\PhpSpreadsheet\Style\Border; use Maatwebsite\Excel\Concerns\WithHeadings; use PhpOffice\PhpSpreadsheet\Style\Alignment; use Maatwebsite\Excel\Concerns\ShouldAutoSize; use Maatwebsite\Excel\Concerns\WithColumnWidths; use PhpOffice\PhpSpreadsheet\Worksheet\Worksheet; use PhpOffice\PhpSpreadsheet\Worksheet\Drawing; class StoreItemExport implements FromView, ShouldAutoSize, WithStyles,WithColumnWidths ,WithHeadings, WithEvents { use Exportable; protected $data; public function __construct($data) { $this->data = $data; } public function view(): View { return view('file-exports.store-Item', [ 'data' => $this->data, ]); } public function columnWidths(): array { return [ 'B' => 15, // 'C' => 25, 'D' => 40, 'I' => 40, 'J' => 40, 'O' => 40, ]; } public function styles(Worksheet $sheet) { $sheet->getStyle('A2:H2')->getFont()->setBold(true); $sheet->getStyle('A3:P3')->getFill()->applyFromArray([ 'fillType' => 'solid', 'rotation' => 0, 'color' => ['rgb' => '9F9F9F'], ]); $sheet->setShowGridlines(false); $styleArray = [ 'borders' => [ 'bottom' => ['borderStyle' => 'hair', 'color' => ['argb' => 'FFFF0000']], 'top' => ['borderStyle' => 'hair', 'color' => ['argb' => 'FFFF0000']], 'right' => ['borderStyle' => 'hair', 'color' => ['argb' => 'FF00FF00']], 'left' => ['borderStyle' => 'hair', 'color' => ['argb' => 'FF00FF00']], ], 'fillType' => 'solid', 'rotation' => 0, ]; $sheet->getStyle('A1:C1')->applyFromArray($styleArray); return [ // Define the style for cells with data 'A1:P'.$this->data['data']->count() +3 => [ 'borders' => [ 'allBorders' => [ 'borderStyle' => Border::BORDER_THIN, 'color' => ['argb' => '000000'], // Specify the color of the border (optional) ], ], ], ]; } public function setImage($workSheet) { $this->data['data']->each(function($item,$index) use($workSheet) { $drawing = new Drawing(); $drawing->setName($item->name); $drawing->setDescription($item->name); $drawing->setPath(is_file(storage_path('app/public/product/'.$item->image))?storage_path('app/public/product/'.$item->image):public_path('/assets/admin/img/160x160/img2.jpg')); $drawing->setHeight(25); $index+=4; $drawing->setCoordinates("B$index"); $drawing->setWorksheet($workSheet); }); } public function registerEvents(): array { return [ AfterSheet::class => function(AfterSheet $event) { $event->sheet->getStyle('A1:P1') // Adjust the range as per your needs ->getAlignment() ->setHorizontal(Alignment::HORIZONTAL_CENTER) ->setVertical(Alignment::VERTICAL_CENTER); $event->sheet->getStyle('A2:C2') ->getAlignment() ->setHorizontal(Alignment::HORIZONTAL_CENTER) ->setVertical(Alignment::VERTICAL_CENTER); $event->sheet->getStyle('A3:C3') ->getAlignment() ->setHorizontal(Alignment::HORIZONTAL_CENTER) ->setVertical(Alignment::VERTICAL_CENTER); $event->sheet->getStyle('A3:P'.$this->data['data']->count() +4) ->getAlignment() ->setHorizontal(Alignment::HORIZONTAL_CENTER) ->setVertical(Alignment::VERTICAL_CENTER); $event->sheet->getStyle('D2:P2') ->getAlignment() ->setHorizontal(Alignment::HORIZONTAL_LEFT) ->setVertical(Alignment::VERTICAL_CENTER); $event->sheet->mergeCells('A1:P1'); $event->sheet->mergeCells('A2:C2'); $event->sheet->mergeCells('D2:P2'); $event->sheet->getDefaultRowDimension()->setRowHeight(30); $event->sheet->getRowDimension(1)->setRowHeight(50); $event->sheet->getRowDimension(2)->setRowHeight(80); $workSheet = $event->sheet->getDelegate(); $this->setImage($workSheet); }, ]; } public function headings(): array { return [ '1' ]; } }
/home/users/unlimited/www/admin.brosiper.codeskitter.site/app/Exports/StoreItemExport.php