Role

Statamic\API\Role


Get all roles.

Role::all(); // Returns \Illuminate\Support\Collection

Get a role by ID.

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

Check if a role exists.

Role::exists($id); // Returns a boolean

Get a role by handle.

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

Import using:

use Statamic\API\Role