Skip to content

[9.x] Add missing method to View/ComponentAttributeBag - #45016

Merged
taylorotwell merged 4 commits into
laravel:9.xfrom
ProjektGopher:feat/view-component-attribute-bag-missing
Nov 18, 2022
Merged

taylorotwell merged 4 commits into
laravel:9.xfrom
ProjektGopher:feat/view-component-attribute-bag-missing

Conversation

@ProjektGopher

Copy link
Copy Markdown
Contributor

Simple quality-of-life/legibility improvement for checking if an attribute is missing from the ComponentAttributeBag.

- if ($override instanceof ComponentAttributeBag && !$override->has('class')) {
+ if ($override instanceof ComponentAttributeBag && $override->missing('class')) {
  return $base;
}

@ProjektGopher ProjektGopher changed the title Feature (non-breaking): add missing method to View/ComponentAttributeBag [9.x] Add missing method to View/ComponentAttributeBag Nov 18, 2022
@taylorotwell
taylorotwell merged commit 81ea922 into laravel:9.x Nov 18, 2022
@ProjektGopher
ProjektGopher deleted the feat/view-component-attribute-bag-missing branch November 18, 2022 21:04
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