/** * Get the post value. * * @param null $default * @return null|Carbon */ public function getPostValue($default = null) { if (!($value = array_filter((array) parent::getPostValue($default)))) { return null; } if ($this->getColumnType() === 'datetime' && count($value) !== 2) { return null; } return (new Carbon())->createFromFormat($this->getFormat(), implode(' ', $value)); }
/** * Get the post value. * * @param null $default * @return bool */ public function getPostValue($default = null) { return filter_var(parent::getPostValue($default), FILTER_VALIDATE_BOOLEAN); }
/** * Get the post value. * * @param null $default * @return array */ public function getPostValue($default = null) { return array_filter(explode(',', parent::getPostValue($default))); }
/** * Get the post value. * * @param null $default * @return array */ public function getPostValue($default = null) { return explode(',', parent::getPostValue($default)); }
/** * Return the validation value. * * @param null $default * @return mixed */ public function getValidationValue($default = null) { return parent::getPostValue($default); }