Skip to content

Conversation

@seriquynh
Copy link
Contributor

In Renderer\Exception::applicationRouteParametersContext() method, it has a check "$value instanceof Model" but Model class is not imported. So, I just import Model class for Renderer\Exception.

    /**
     * Get the application's route parameters context.
     *
     * @return array<string, mixed>|null
     */
    public function applicationRouteParametersContext()
    {
        $parameters = $this->request()->route()?->parameters();

        return $parameters ? json_encode(array_map(
            fn ($value) => $value instanceof Model ? $value->withoutRelations() : $value,
            $parameters
        ), JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT) : null;
    }

@taylorotwell taylorotwell merged commit 6d13661 into laravel:11.x Jun 12, 2024
@seriquynh seriquynh deleted the add-missing-import branch June 13, 2024 01:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants