src/Components/Builder/Providers/FormProvider.php
protected function getCheckboxCheckedState($name, $value, $checked)
    {
        $posted = $this->getValueAttribute($name, $checked);

        if (is_array($posted)) {
            return in_array($value, $posted);
        } else {
            return (bool)$posted;
        }
    }
protected function getCheckboxCheckedState($name, $value, $checked)
    {
        $posted = $this->getValueAttribute($name, $checked);

        if (is_array($posted)) {
            return in_array($value, $posted);
        } else {
            return (bool)$posted;
        }
    }
Get the check state for a checkbox input.

@param  string $name
@param  mixed  $value
@param  bool   $checked

@return bool