belongsTo($this->entity_type, 'entity_id'); } public function voucher() { return $this->belongsTo(Voucher::class, 'entity_id'); } public function sale() { return $this->belongsTo(Sale::class, 'sale_id'); } public function shareWord(): Attribute { return Attribute::make(get: function () { return Setting::getByKey('SHARE_TEXT'); }); } }