protected function getCastType($key)
    {
        if ($this->isCustomDateTimeCast($this->getCasts()[$key])) {
            return 'custom_datetime';
        }

        if ($this->isDecimalCast($this->getCasts()[$key])) {
            return 'decimal';
        }

        return trim(strtolower($this->getCasts()[$key]));
    }
protected function getCastType($key)
    {
        if ($this->isCustomDateTimeCast($this->getCasts()[$key])) {
            return 'custom_datetime';
        }

        if ($this->isDecimalCast($this->getCasts()[$key])) {
            return 'decimal';
        }

        return trim(strtolower($this->getCasts()[$key]));
    }
protected function getCastType ( $ key ) { if ( $ this -> isCustomDateTimeCast ( $ this -> getCasts ( ) [ $ key ] ) ) { return 'custom_datetime' ; } if ( $ this -> isDecimalCast ( $ this -> getCasts ( ) [ $ key ] ) ) { return 'decimal' ; } return trim ( strtolower ( $ this -> getCasts ( ) [ $ key ] ) ) ; }
Get the type of cast for a model attribute.

@param  string  $key
@return string
Get the type of cast for a model attribute .