Skip to content

Commit

Permalink
- fix morphTo Relation key conventions
Browse files Browse the repository at this point in the history
  • Loading branch information
ibrahem-kamal committed Feb 5, 2024
1 parent 5383e48 commit 7e824f9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Models/OtpCode.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class OtpCode extends Model

public function relatable(): MorphTo
{
return $this->morphTo();
return $this->morphTo(__FUNCTION__, 'relatable_type', 'relatable_id');
}

public function scopeExpired(Builder $query): Builder
Expand Down

0 comments on commit 7e824f9

Please sign in to comment.