Skip to content

Commit c02e584

Browse files
committed
fix: keep camel cased name except for getMorphs
1 parent e19e10a commit c02e584

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Eloquent/HybridRelations.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,10 +174,10 @@ public function morphTo($name = null, $type = null, $id = null, $ownerKey = null
174174
if ($name === null) {
175175
[$current, $caller] = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 2);
176176

177-
$name = Str::snake($caller['function']);
177+
$name = $caller['function'];
178178
}
179179

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

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

0 commit comments

Comments
 (0)