Skip to content

Commit

Permalink
Merge pull request #6 from ibrahem-kamal/development
Browse files Browse the repository at this point in the history
fix morphTo Relation key conventions
  • Loading branch information
ibrahem-kamal authored Feb 5, 2024
2 parents ff5379a + 6402281 commit c20558e
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(__FUNCTION__, 'relatable_type', 'relatable_id');
return $this->morphTo(__FUNCTION__, 'model_type', 'model_id');
}

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

0 comments on commit c20558e

Please sign in to comment.