%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/silvzytp/crm-dub-code/app/Models/
Upload File :
Create Path :
Current File : /home/silvzytp/crm-dub-code/app/Models/Colling.php

<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class Colling extends Model
{
    use HasFactory;

    /**
     * The attributes that aren't mass assignable.
     *
     * @var array
     */
    protected $guarded = [];
    
    /**
     * The attributes that should be cast to native types.
     *
     * @var array
     */
    protected $casts = [
        'comment_time' => 'array',
        'follow_up1_time' => 'array',
        'follow_up2_time' => 'array',
        'follow_up3_time' => 'array',
    ];

    public function agent(){
        return $this->belongsTo(User::class, 'agent_id','id')->withDefault(['name'=>'N/A']);
    }
    
    public function importer(){
        return $this->belongsTo(User::class, 'import_id','id')->withDefault(['name'=>'N/A']);
    }

    public function callingStatus()
    {
        return $this->belongsTo(CallingStatus::class, 'status','id')->withDefault(['name'=>'N/A']);
    }

    public function callingSubStatus()
    {
        return $this->belongsTo(CallingSubStatus::class, 'sub_status','id')->withDefault(['name'=>'N/A']);
    }
}

Zerion Mini Shell 1.0