From 77a2bef93871205b61a2791b24f1aea03b4c8015 Mon Sep 17 00:00:00 2001 From: ngaspari <33628128+ngaspari@users.noreply.github.com> Date: Mon, 8 Jan 2024 09:21:08 +0100 Subject: [PATCH] Update Attachable.php (#34) define model (->using... ), so we can observe it --- src/App/Traits/Attachable.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/App/Traits/Attachable.php b/src/App/Traits/Attachable.php index 27c3f95..ca175c6 100644 --- a/src/App/Traits/Attachable.php +++ b/src/App/Traits/Attachable.php @@ -11,6 +11,8 @@ trait Attachable { public function attachments(): MorphToMany { - return $this->morphToMany(get_class(app(Attachment::class)), 'attachable')->withTimestamps(); + return $this->morphToMany(get_class(app(Attachment::class)), 'attachable') + ->using(\Asseco\Attachments\App\Models\Attachable::class) + ->withTimestamps(); } }