October\Rain\Database\Traits\Nullable

Public methods

public $this addNullable(array|string|null $attributes=NULL)

Adds an attribute to the nullable attributes list

Parameters
  • array|string|null $attributes

public static void bootNullable()

Boot the nullable trait for a model

public bool checkNullableValue(string $value)

Checks if the supplied value is empty, excluding zero.

Parameters
  • string $value - Value to check

public void nullableBeforeSave()

Nullify empty fields