Skip to content

Commit

Permalink
Merge pull request #14 from samrap/dev
Browse files Browse the repository at this point in the history
Update readme to document changes.
  • Loading branch information
Sam Rapaport authored Apr 19, 2017
2 parents fb648be + 4ef77ef commit 51af7b9
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,20 @@ The current supported functions for the `escape` method are:

---

#### `Samrap\Acf\Fluent\Builder::raw(void)`

When retrieving a field, ACF lets you specify whether or not to format the value from the database. ACF Fluent follows the plugin's convention by formatting the field by default. You may use the builder's `raw` method to retrieve the value from the database unformatted:

```php
use Samrap\Acf\Acf;

$raw = Acf::field('image')
->raw()
->get();
```

In this example, the `image` field is never formatted and returned as is from the database.

### Updating Fields

Though typically less common, you may find yourself updating fields or sub fields from time to time. The fluent builder provides you with the `update` method to do just that:
Expand Down

0 comments on commit 51af7b9

Please sign in to comment.