Skip to content

Conversation

@PerryvanderMeer
Copy link
Contributor

This PR is an alternative implementation of #48084 and introduces a new short-hand syntax for false properties.

<x-layout !margin />

Is equivalent to:

<x-layout :margin="false">

@taylorotwell
Copy link
Member

Any limitations here? What are the main improvements over the previous attempt?

@PerryvanderMeer
Copy link
Contributor Author

@taylorotwell The previous attempt failed to parse cases like

<x-test :value="$value && !old('value')" />

This implementation prevents replacing any !string within double quotes.

@taylorotwell taylorotwell merged commit af710f5 into laravel:12.x Sep 19, 2025
65 checks passed
@nuernbergerA
Copy link
Contributor

nuernbergerA commented Sep 23, 2025

this breaks

<x-whatever @class(['!block' => $condition]) />

@browner12
Copy link
Contributor

@nuernbergerA I'd submit a PR reverting the changes explaining the breaking scenario.

taylorotwell added a commit that referenced this pull request Sep 23, 2025
taylorotwell added a commit that referenced this pull request Sep 23, 2025
tegos pushed a commit to tegos/laravel-framework that referenced this pull request Sep 28, 2025
tegos pushed a commit to tegos/laravel-framework that referenced this pull request Sep 28, 2025
NickSdot pushed a commit to NickSdot/laravel-framework that referenced this pull request Oct 30, 2025
NickSdot pushed a commit to NickSdot/laravel-framework that referenced this pull request Oct 30, 2025
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.

4 participants