Skip to content

Commit cbefb7a

Browse files
committed
docs(view): update for with and without methods introduced in tempestphp#2094
1 parent df1d4d4 commit cbefb7a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

docs/1-essentials/02-views.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ You cannot mix `ApplyAttribute` with automatic fallthrough attributes. Opting to
404404

405405
To exclude specific attributes from falling through, configure your `button` view component like this:
406406
```html x-button.view.php
407-
<button :apply="$attributes->diffKeys(array_flip(['id', 'style']))">
407+
<button :apply="$attributes->without(['id', 'style'])">
408408
<x-slot />
409409
</button>
410410
```
@@ -424,7 +424,7 @@ Will result in:
424424

425425
To include only specific attributes, configure your `button` view component like this:
426426
```html x-button.view.php
427-
<button :apply="$attributes->intersectKeys(array_flip(['class', 'width', 'height']))">
427+
<button :apply="$attributes->with(['class', 'width', 'height'])">
428428
<x-slot />
429429
</button>
430430
```

0 commit comments

Comments
 (0)