public function setAttribute($attribute, $value)
    {
        // Give mutator priority over custom casts
        if ($this->hasSetMutator($attribute)) {
            $method = 'set' . studly_case($attribute) . 'Attribute';

            return $this->{$method}($value);
        }

        if (array_key_exists($attribute, $this->filterCustomCasts())) {
            /** @var $customCastObject CustomCastBase */
            $customCastObject = $this->getCustomCastObject($attribute);

            $this->attributes[$attribute] = $customCastObject->setAttribute($value);

            return $this;
        }

        parent::setAttribute($attribute, $value);
    }