Skip to content

Commit

Permalink
Update Attachable.php (#34)
Browse files Browse the repository at this point in the history
define model (->using... ), so we can observe it
  • Loading branch information
ngaspari authored Jan 8, 2024
1 parent d7c4dbf commit 77a2bef
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/App/Traits/Attachable.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}

0 comments on commit 77a2bef

Please sign in to comment.