Skip to content

Conversation

@Log1x
Copy link
Member

@Log1x Log1x commented Mar 27, 2025

When with() is not defined, Composers now behave identical to View Components with public methods automatically being available inside configured views.

It's worth noting variables are invokable when not being casted.

// Always true!
@if ($example)
  {{ $example }}
@endif

// Do this instead.
@if ($example())
  {{ $example }}
@endif

@github-actions github-actions bot added views php Pull requests that update PHP code labels Mar 27, 2025
@Log1x Log1x merged commit 5ffb563 into main Mar 27, 2025
3 checks passed
@Log1x Log1x deleted the chore/simplify-composers branch March 27, 2025 02:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

php Pull requests that update PHP code views

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants