belongsTo(Project::class); } public function partner() { return $this->morphTo(); } public function type() { $type = Type::getNameById($this->type_id); if ($this->in_out == 0 && $this->partner_type == 'App\Entities\Users\User') { $type .= ' Fee'; } return $type; } }