mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-02-01 00:16:55 +01:00
24 lines
338 B
PHP
24 lines
338 B
PHP
<?php
|
|
|
|
namespace Modules\DDT\Components;
|
|
|
|
use Modules\DDT\DDT;
|
|
|
|
trait RelationTrait
|
|
{
|
|
public function getParentID()
|
|
{
|
|
return 'idddt';
|
|
}
|
|
|
|
public function parent()
|
|
{
|
|
return $this->belongsTo(DDT::class, $this->getParentID());
|
|
}
|
|
|
|
public function ddt()
|
|
{
|
|
return $this->parent();
|
|
}
|
|
}
|