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


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

/**
 * @package ProductResource
 * @author TechVillage <support@techvill.org>
 * @contributor Sakawat Hossain Rony <[sakawat.techvill@gmail.com]>
 * @contributor Md Abdur Rahaman Zihad <[zihad.techvill@gmail.com]>
 * @created 28-10-2021
 */

namespace App\Http\Resources;

use 
Illuminate\Http\Resources\Json\JsonResource;

class 
ProductResource extends JsonResource
{
    
/**
     * Transform the resource into an array.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return array
     */
    
public function toArray($request null)
    {
        
$userId null;
        if (!isset(
$request->user_id) && isset(auth()->guard('api')->user()->id)) {
            
$userId auth()->guard('api')->user()->id;
        } elseif (isset(
$request->user_id)) {
            
$userId $request->user_id;
        }

        return [
            
'id' => $this->id,
            
'name' => $this->name,
            
'code' => $this->code,
            
'sku' => $this->sku,
            
'slug' => $this->slug,
            
'type' => $this->type,
            
'available_from' => $this->available_from,
            
'available_to' => $this->available_to,
            
'summary' => $this->summary,
            
'categories' => $this->getCategoryName(),
            
'brand' => optional($this->brand)->name,
            
'brand_id' => $this->brand_id,
            
'shop_id' => $this->shop_id,
            
'vendor_id' => $this->vendor_id,
            
'regular_price' => $this->getPrice(),
            
'regular_price_formatted' => $this->getFormattedPrice(),
            
'sale_price' => $this->getSalePrice(),
            
'sale_price_formatted' => $this->getFormattedSalePrice(),
            
'sale_from' => $this->sale_from,
            
'sale_to' => $this->sale_to,
            
'total_sales' => $this->total_sales,
            
'featured' => $this->featured,
            
'virtual' => $this->meta_virtual,
            
'downloadable' => $this->meta_downloadable,
            
'status' => $this->status,
            
'total_downloads' => $this->purchase_downloads,
            
'manage_stocks'  => $this->isStockManageable(),
            
'stock_quantity' => $this->getStockQuantity(),
            
'stock_status' => $this->getStockStatus(),
            
'stock_hide' => $this->meta_hide_stock,
            
'backorders' => $this->isAllowBackorder(),
            
'critical_stock_quantity' => $this->meta_stock_threshold,
            
'shipping_status' => true,
            
'shipping_required' => true,
            
'featured_image' =>  $this->getFeaturedImage(),
            
'featured_image_small' =>  $this->getFeaturedImage('small'),
            
'featured_image_medium' =>  $this->getFeaturedImage('medium'),
            
'tags' => TagResource::collection$this->whenLoaded('tags'$this->tags)),
            
'review_count' => $this->review_count,
            
'review_average' => $this->review_average,
            
'attributes' => $this->getProductAttributes(),
            
'attribute_values' => $this->getAttributeValues(),
            
'offerCheck' => $this->offerCheck(),
            
'discountPercent' => $this->getDiscountAmount(),
            
'estimated_delivery' => $this->estimated_delivery,
            
'estimated_delivery_unit' => 'days',
            
'is_wishlisted' => $this->isWishlist($this->id$userId),
            
'is_compared' => isCompared($this->id$userId),
            
'isOutOfStock' => $this->isOutOfStock()
        ];
    }
}

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