GlobalSet

Statamic\API\GlobalSet


We’d call this class Global if PHP was cool with it. But it isn’t.

Get all global sets.

GlobalSet::all(); // Returns GlobalCollection

Get a global by ID.

GlobalSet::find($id); // Returns GlobalSet

Get a global by handle.

GlobalSet::whereHandle($handle); // Returns GlobalSet

Create a global.

This returns an instance of a GlobalFactory to allow you to chain and build your global.

GlobalSet::create($handle); // Returns GlobalFactory

Import using:

use Statamic\API\GlobalSet