Skip to content

🎨 Simplify the default Composers #3250

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

Merged
merged 2 commits into from
Mar 27, 2025
Merged

🎨 Simplify the default Composers #3250

merged 2 commits into from
Mar 27, 2025

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.

1 participant