We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
11.0.8
8.3.3
No response
If you use a method to pass data to a blade component, the method will be run twice, leading to unexpected behaviour.
For example, you would think this will simply shift the first item, and pass it to the component:
shift
<x-article :article="$articles->shift()"/>
But it removes two items from the $articles collection.
$articles
You would have to do something like this to fix it:
@php($first = $articles->shift()) <x-article-card :article="$first"/>
The text was updated successfully, but these errors were encountered:
Ref #50403 #50479
Sorry, something went wrong.
Using the solution from above is, for now at least, the only one.
No branches or pull requests
Laravel Version
11.0.8
PHP Version
8.3.3
Database Driver & Version
No response
Description
If you use a method to pass data to a blade component, the method will be run twice, leading to unexpected behaviour.
For example, you would think this will simply
shift
the first item, and pass it to the component:But it removes two items from the
$articles
collection.You would have to do something like this to fix it:
Steps To Reproduce
shift
The text was updated successfully, but these errors were encountered: