⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.134
Server IP:
68.65.123.197
Server:
Linux premium49.web-hosting.com 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13 UTC 2025 x86_64
Server Software:
LiteSpeed
PHP Version:
8.2.29
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
home
/
smarbgfw
/
public_html
/
updater
/
app
/
Exports
/
View File Name :
DonationExport.php
<?php namespace App\Exports; use App\BasicExtra; use Maatwebsite\Excel\Concerns\FromCollection; use Maatwebsite\Excel\Concerns\WithHeadings; use Maatwebsite\Excel\Concerns\WithMapping; class DonationExport implements FromCollection, WithHeadings, WithMapping { public $donations; public function __construct($donations) { $this->donations = $donations; } /** * @return \Illuminate\Support\Collection */ public function collection() { return $this->donations; } public function map($donation): array { $bex = BasicExtra::firstOrFail(); return [ $donation->transaction_id, $donation->name ? $donation->name : '-', $donation->email ? $donation->email : '-', $donation->phone ? $donation->phone : '-', !empty($donation->event) ? $donation->event->title : '-', ($bex->base_currency_symbol_position == 'left' ? $bex->base_currency_symbol : '') . $donation->amount . ($bex->base_currency_symbol_position == 'right' ? $bex->base_currency_symbol : ''), $donation->payment_method, $donation->status, $donation->created_at ]; } public function headings(): array { return [ 'Donation ID', 'Name', 'Email', 'Phone', 'Event', 'Amount', 'Gateway', 'Payment Status', 'Date' ]; } }