belongsTo(Company::class); } public function user() { return $this->belongsTo(User::class)->withTrashed(); } public function vendor() { return $this->belongsTo(Vendor::class)->withTrashed(); } public function assigned_user() { return $this->belongsTo(User::class, 'assigned_user_id', 'id')->withTrashed(); } public function documents() { return $this->morphMany(Document::class, 'documentable'); } public function translate_entity() { return ctrans('texts.product'); } public function markdownNotes() { $converter = new CommonMarkConverter([ 'allow_unsafe_links' => false, 'renderer' => [ 'soft_break' => '
', ], ]); return $converter->convert($this->notes); } }