mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/unity.git
synced 2026-08-19 20:34:01 +00:00
23 lines
522 B
PHP
23 lines
522 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class ContractTemplate extends Model
|
|
{
|
|
protected $table = 'contract_templates';
|
|
|
|
protected $appends = ['contract_template_obligation_list'];
|
|
|
|
public function contract_template_obligation()
|
|
{
|
|
return $this->hasMany('App\Models\ContractTemplateObligation', 'contract_template_id');
|
|
}
|
|
|
|
public function getContractTemplateObligationListAttribute()
|
|
{
|
|
return $this->contract_template_obligation()->get();
|
|
}
|
|
}
|