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


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

/**
 * @package Message Model
 * @author TechVillage <support@techvill.org>
 * @contributor Md Abdur Rahaman Zihad <[zihad.techvill@gmail.com]>
 * @created 05-22-2022
 */

namespace Modules\Ticket\Http\Models;

use 
App\Models\Model;
use 
App\Traits\ModelTrait;
use 
App\Traits\ModelTraits\hasFiles;

class 
Message extends Model
{
    use 
ModelTraithasFiles;

    protected 
$table "thread_replies";

    protected 
$fillable = [
        
'thread_id',
        
'sender_id',
        
'message',
        
'receiver_id',
        
'date',
        
'has_attachment',
    ];

    public 
$timestamps false;


    protected static function 
booted()
    {
        static::
creating(function ($message) {
            
$message->date date('Y-m-d H:i:s');
            
$message->is_read 0;
        });
    }

    public function 
chat()
    {
        return 
$this->belongsTo('Modules\Ticket\Http\Models\Chat''thread_id''id');
    }

    public function 
sender()
    {
        return 
$this->belongsTo('App\Models\User''sender_id''id');
    }

    public function 
receiver()
    {
        return 
$this->belongsTo('App\Models\User''receiver_id''id');
    }

    public function 
sendByMe()
    {
        return 
$this->sender_id == auth()->id();
    }


    public function 
senderImage($chat)
    {

        if (
$this->sender_id == $chat->sender_id) {
            return 
$this->sender->fileUrl();
        }

        return 
optional($chat->vendorDetails->logo)->fileUrl();
    }


    public static function 
totalUnreadMessages()
    {
        return 
parent::selectRaw("'1' as total")
            ->
join('threads''thread_replies.thread_id''threads.id')
            ->
where('threads.thread_type''chat')
            ->
where('is_read'0)
            ->
where('thread_replies.receiver_id'auth()->id())
            ->
groupBy('thread_id')
            ->
first()->total ?? 0;
    }
}

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