Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[12.x] AbstractPaginator should implement CanBeEscapedWhenCastToString #55256

Conversation

gdebrauwer
Copy link
Contributor

If you pass a paginator to an anonymous blade component, the paginator will be converted to a string in the process, which causes the paginator's render() method to be called. The blade component receives the paginator object in the end, but it does not make sense that the paginator is rendered to a string while passing the object from one blade file to another.

This PR fixes that by implementing CanBeEscapedWhenCastToString interface on the AbstractPaginator class. This is the same as the implementation of that interface on Model, Collection, ... classes (see #39319)

@taylorotwell taylorotwell merged commit 83d07e9 into laravel:12.x Apr 2, 2025
31 checks passed
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