Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/Illuminate/Database/Eloquent/Model.php
Original file line number Diff line number Diff line change
Expand Up @@ -786,7 +786,7 @@ public function belongsTo($related, $foreignKey = null, $otherKey = null, $relat
// of the time this will be what we desire to use for the relationships.
if (is_null($relation))
{
list(, $caller) = debug_backtrace(false);
list(, $caller) = debug_backtrace(false, 2);

$relation = $caller['function'];
}
Expand Down Expand Up @@ -826,7 +826,7 @@ public function morphTo($name = null, $type = null, $id = null)
// use that to get both the class and foreign key that will be utilized.
if (is_null($name))
{
list(, $caller) = debug_backtrace(false);
list(, $caller) = debug_backtrace(false, 2);

$name = snake_case($caller['function']);
}
Expand Down