https://github.com/alwaysblank/plumbing-acf
https://github.com/alwaysblank/plumbing-acf
Last synced: 3 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/alwaysblank/plumbing-acf
- Owner: alwaysblank
- Created: 2018-12-13T22:41:05.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-12-13T23:06:45.000Z (over 7 years ago)
- Last Synced: 2025-11-13T18:03:42.092Z (7 months ago)
- Language: PHP
- Size: 11.7 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# ACF 👩🔧
This provides a very, very simple wrapper for ACF. The only meaningful "feature" it adds in this version is the ability to query several fields at once, and return them in a compiled array.
## Usage
First, install the package:
```bash
composer require livy/plumbing-acf
```
Once it's installed, you can access its methods like so:
```php
Livy\Plumbing\ACF\Simple::getField('my-field');
```
To save some typing, you can always use `use`:
```php
use Livy\Plumbing\ACF\Simple as ACF;
ACF::getField('my-field');
```
### `getFields()`
This method can accept several fields to query at once, and will return them as an array (or a collection, if `Illuminate\Collection`) is available. See the method source for documentation.