Export Action Notifies wrong user

Our app uses the Admin panel on the back for the User model, but also the table, actions, form and notification packages on the front for the Customer model. We've updated the exports table to be a morph relation, so the action can be triggered by either a User or a Customer. Which is fine, this seems to work fine in creating the Export record in the database. But the notification always goes to the User model. So the export generated has a user_type of \App\Models\Customer and a user_id of 16, but the Notification goes to the \App\Models\User with id 16 How can i make sure my Notifications are also sent to the right model? Its as if when creating Exports
if (static::hasPolymorphicUserRelationship()) {
return $this->morphTo();
}
if (static::hasPolymorphicUserRelationship()) {
return $this->morphTo();
}
This works, but not when the notification is created in the ExportCompletion Job....
0 Replies
No replies yetBe the first to reply to this messageJoin