Integer Type

Overview

The integer field type stores whole number values.

// streams/example.json
"fields": {
    "count": {
        "type": "integer"
    }
}

Data Structure

{
    "count": 100
}

Basic value access displays the stored value:

// Basic access
{{ $entry->count }}

Decorator Usage

Boolean types also provide decorated values.

// Decorated value
@if ($entry->count()->isEven())
    // ...
@endif

Methods

@todo Generate methods from @docs

Configuration

@todo Generate config options from class::configuration

// streams/example.json
"fields": {
    "count": {
        "type": "integer",
        "config": {
            "default": "increment"
        }
    }
}