mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/unity.git
synced 2026-08-19 04:13:58 +00:00
vendor machine seeder
This commit is contained in:
@@ -2,10 +2,21 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class ContractTemplate extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user