public function setAttribute($key, $value)
    {
        if ($value !== null && $this->isSerializeCastable($key)) {
            $value = $this->asSerialize($value);
        }

        return parent::setAttribute($key, $value);
    }
public function setAttribute($key, $value)
    {
        if ($value !== null && $this->isSerializeCastable($key)) {
            $value = $this->asSerialize($value);
        }

        return parent::setAttribute($key, $value);
    }
public function setAttribute ( $ key , $ value ) { if ( $ value !== null && $ this -> isSerializeCastable ( $ key ) ) { $ value = $ this -> asSerialize ( $ value ) ; } return parent :: setAttribute ( $ key , $ value ) ; }
Set model attribute. Extend laravel attribute casting mutators by serialized array
@param string $key
@param mixed $value
@return LaravelModel
Set model attribute . Extend laravel attribute casting mutators by serialized array