debug_backtrace
laravel/framework
Supported Versions: PHP 4 >= 4.3.0, PHP 5, PHP 7, PHP 8
Generates a backtrace
debug_backtrace
(
int $options
=
DEBUG_BACKTRACE_PROVIDE_OBJECT
,
int $limit
=
0
): array
protected function
guessBelongsToRelation
()
{
[
$one
,
$two
,
$caller
] =
debug_backtrace
(
DEBUG_BACKTRACE_IGNORE_ARGS
,
3
);
return
$caller
[
'function'
];
}
src/Illuminate/Database/Eloquent/Concerns/HasRelationships.php
protected function
guessBelongsToManyRelation
()
{
$caller
=
Arr
::
first
(
debug_backtrace
(
DEBUG_BACKTRACE_IGNORE_ARGS
), function (
$trace
) {
return !
in_array
(
$trace
[
'function'
],
array_merge
(static::
$manyMethods
, [
'guessBelongsToManyRelation'
])
src/Illuminate/Database/Eloquent/Concerns/HasRelationships.php
protected function
guessRelationship
()
{
return
debug_backtrace
(
DEBUG_BACKTRACE_IGNORE_ARGS
,
3
)[
2
][
'function'
];
}
src/Illuminate/Database/Eloquent/Relations/Concerns/CanBeOneOfMany.php
return [
$ability
,
$arguments
];
}
$method
=
debug_backtrace
(
DEBUG_BACKTRACE_IGNORE_ARGS
,
3
)[
2
][
'function'
];
return [
$this
->
normalizeGuessedAbilityName
(
$method
),
$ability
];
}
src/Illuminate/Foundation/Auth/Access/AuthorizesRequests.php