protected function getCustomCastObject($attribute)
    {
        // Check if custom cast object already been set
        if (isset($this->customCastObjects[$attribute])) {
            return $this->customCastObjects[$attribute];
        }

        $customCastClass = $this->casts[$attribute];
        $customCastObject = new $customCastClass($this, $attribute);

        return $this->customCastObjects[$attribute] = $customCastObject;
    }
protected function getCustomCastObject($attribute)
    {
        // Check if custom cast object already been set
        if (isset($this->customCastObjects[$attribute])) {
            return $this->customCastObjects[$attribute];
        }

        $customCastClass = $this->casts[$attribute];
        $customCastObject = new $customCastClass($this, $attribute);

        return $this->customCastObjects[$attribute] = $customCastObject;
    }
protected function getCustomCastObject ( $ attribute ) { // Check if custom cast object already been set if ( isset ( $ this -> customCastObjects [ $ attribute ] ) ) { return $ this -> customCastObjects [ $ attribute ] ; } $ customCastClass = $ this -> casts [ $ attribute ] ; $ customCastObject = new $ customCastClass ( $ this , $ attribute ) ; return $ this -> customCastObjects [ $ attribute ] = $ customCastObject ; }
Lazy load custom cast object and return it

@param $attribute

@return CustomCastBase
Lazy load custom cast object and return it