<?php
namespace QxCMS\Modules\Client\Models\Principals;
use Illuminate\Database\Eloquent\Model;
class ContactPerson extends Model
{
protected $connection = "client";
protected $table = "principal_contact_persons";
public $module_id = 4;
protected $guarded = ['contact'];
protected $appends = ['hashid'];
public function getHashidAttribute()
{
return hashid($this->id);
}
public function principal()
{
return $this->belongsTo('QxCMS\Modules\Client\Models\Principals\Principal', 'principal_id');
}
public function numbers()
{
return $this->hasMany('QxCMS\Modules\Client\Models\Principals\ContactNumber', 'principal_contact_id');
}
}