Skip to content

Commit

Permalink
📚 docs: Added group example default
Browse files Browse the repository at this point in the history
  • Loading branch information
tombroucke committed Oct 14, 2024
1 parent fa51e6b commit 5f5c836
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,15 @@ When getting the value for a Group field, an `Illuminate/Support/Collection` wil

### Group

```php
$settings = AcfObjects::getField('settings')
->default([
'foo' => 'bar'
]);

echo $settings->get('foo');
```

```blade
{{ AcfObjects::getField('settings')->get('name') }}
```
Expand Down

0 comments on commit 5f5c836

Please sign in to comment.