Replies: 1 comment
-
Similar request here too. E.g we log the n+1 violations and need to manually specify the backtrace in the error message. Model::handleLazyLoadingViolationUsing(static function (Model $model, string $relation): void {
$fullTrace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, limit: 6);
$trace = array_pop($fullTrace);
ray(__(
'N+1 Query detected for `:relation` on the `:class` model in: :file::line.', [
'relation' => $relation,
'class' => $model::class,
'file' => $trace['file'],
'line' => $trace['line'],
]));
});
Instead simple message with the file link at the bottom
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Ray is great but how i can set a custom Origin?
ex:
function r(...$params) {
return ray(...$params);
}
This works, except for the fact that Ray shows, ofcourse, the file and line-number of this above ray()-call.
It would be nice if you could configure the depth of the origin-search, so that Ray could show the line where my custom debugging-method was called.
Beta Was this translation helpful? Give feedback.
All reactions