⚝
One Hat Cyber Team
⚝
Your IP:
172.22.0.1
Server IP:
151.80.20.34
Server:
Linux 794f04d97d5e 5.15.0-143-generic #153-Ubuntu SMP Fri Jun 13 19:10:45 UTC 2025 x86_64
Server Software:
Apache/2.4.62 (Debian)
PHP Version:
8.2.28
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
var
/
www
/
html
/
app
/
Models
/
Edit File: Lead.php
<?php namespace App\Models; use Illuminate\Database\Eloquent\Model; class Lead extends Model { protected $fillable = [ 'name', 'email', 'subject', 'user_id', 'pipeline_id', 'stage_id', 'sources', 'products', 'notes', 'labels', 'order', 'created_by', 'is_active', 'date', ]; public function labels() { if($this->labels) { return Label::whereIn('id', explode(',', $this->labels))->get(); } return false; } public function stage() { return $this->hasOne('App\Models\LeadStage', 'id', 'stage_id'); } public function files() { return $this->hasMany('App\Models\LeadFile', 'lead_id', 'id'); } public function pipeline() { return $this->hasOne('App\Models\Pipeline', 'id', 'pipeline_id'); } public function products() { if($this->products) { return ProductService::whereIn('id', explode(',', $this->products))->get(); } return []; } public function sources() { if($this->sources) { return Source::whereIn('id', explode(',', $this->sources))->get(); } return []; } public function users() { return $this->belongsToMany('App\Models\User', 'user_leads', 'lead_id', 'user_id'); } public function activities() { return $this->hasMany('App\Models\LeadActivityLog', 'lead_id', 'id')->orderBy('id', 'desc'); } public function discussions() { return $this->hasMany('App\Models\LeadDiscussion', 'lead_id', 'id')->orderBy('id', 'desc'); } public function calls() { return $this->hasMany('App\Models\LeadCall', 'lead_id', 'id'); } public function emails() { return $this->hasMany('App\Models\LeadEmail', 'lead_id', 'id')->orderByDesc('id'); } }
Simpan