���Root Mod By V1rus_Alfa
User / IP
:
216.73.217.78
Host / Server
:
195.214.235.115 / npln.ir
System
:
Linux damavand.pws-dns.net 5.14.0-503.35.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Apr 4 05:23:43 EDT 2025 x86_64
Command
|
Upload
|
Mass Deface
|
Create
:
/
home2
/
cutunixc
/
repositories
/
npln
/
app
/
Livewire
/
Admin
/
Pages
/
Reports
/
Customer
/
Viewing: Table.php
<?php namespace App\Livewire\Admin\Pages\Reports\Customer; use Livewire\Component; use Illuminate\Http\Request; use Livewire\WithPagination; use App\Models\UserServices; use App\Models\Order; use DB; class Table extends Component { use WithPagination; protected $listeners = ['refreshData' => '$refresh','filterSearch' => 'filterDate']; public $start; public $end; public $search = ''; public function filterDate($date,Request $request){ if(isset($date[0])){ $this->start=$date[0]; } if(isset($date[1])){ $this->end=$date[1]; } $this->dispatch('refreshPayment'); } public function render() { $result=Order:: when(auth()->user()->roll == 'manager_order' ,function($q) { $q->where('services_id',Auth::user()->parent); }) ->when(!in_array(auth()->user()->roll,['ADMIN']) ,function($q) { $q->where('services_id',Auth::user()->id); }) ->when($this->search,function($q) { $q->whereHas('customer',function($q){ $q->where(function($q){ $q->where('first_name', 'like', '%'.$this->search.'%') ->orWhere('last_name', 'like', '%'.$this->search.'%') ->orWhereRaw('CONCAT(first_name," ",last_name) LIKE \''.$this->search.'%\'') ->orWhere('mobile', 'like', '%'.$this->search.'%'); }); }); }) ->select('customer_id' , DB::raw("count(id) as count ")) ->when($this->start && $this->end,function($q){ $q->where('created_at', '>=', $this->start)->where('created_at', '<=', $this->end); }) ->groupBy(['customer_id'])->orderBy('count','desc')->paginate(10); $data=['result'=> $result ]; return view('livewire.admin.pages.reports.customer.table',$data); } }
Coded With 💗 by
0x6ick Mod By V1rus_Alfa