Skip to content

Commit bd35157

Browse files
willtjdivine
authored andcommitted
fix: keep camel cased name except for getMorphs
1 parent 23b6fe9 commit bd35157

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: src/Eloquent/HybridRelations.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -180,10 +180,10 @@ public function morphTo($name = null, $type = null, $id = null, $ownerKey = null
180180
if ($name === null) {
181181
[$current, $caller] = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 2);
182182

183-
$name = Str::snake($caller['function']);
183+
$name = $caller['function'];
184184
}
185185

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

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

0 commit comments

Comments
 (0)