Skip to content

Commit

Permalink
fix: keep camel cased name except for getMorphs
Browse files Browse the repository at this point in the history
  • Loading branch information
willtj authored and divine committed Jan 16, 2023
1 parent 23b6fe9 commit bd35157
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Eloquent/HybridRelations.php
Original file line number Diff line number Diff line change
Expand Up @@ -180,10 +180,10 @@ public function morphTo($name = null, $type = null, $id = null, $ownerKey = null
if ($name === null) {
[$current, $caller] = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 2);

$name = Str::snake($caller['function']);
$name = $caller['function'];
}

[$type, $id] = $this->getMorphs($name, $type, $id);
[$type, $id] = $this->getMorphs(Str::snake($name), $type, $id);

// If the type value is null it is probably safe to assume we're eager loading
// the relationship. When that is the case we will pass in a dummy query as
Expand Down

0 comments on commit bd35157

Please sign in to comment.