Number Type

Overview

The number field type stores numeric values including floating point numbers. If you need to support fixed-precision numbers, check out the decimal field type.

// streams/example.json
"fields": {
    "price": {
        "type": "number"
    }
}

Configuration

@todo Generate config options from class::configuration

Data Structure

{
    "price": 89.95
}

Basic value access displays the stored value:

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

Decorator Usage

Boolean types also provide decorated values.

// Decorated value
@if ($entry->price()->isOdd())
    // ...
@endif

Methods

@todo Generate methods from @docs