public function setAttribute($key, $value)
    {
        if (isset($this->repositories[$key])) {
            if (! ($value instanceof $this->repositories[$key])) {
                return;
            }

            $className = str_replace('\\', '', $this->repositories[$key]);

            $this->cache->set(
                "repositories.{$className}.{$this->id}.{$key}",
                $value
            );

            return;
        }

        if ($str = $this->checkForMutator($key, 'set')) {
            $this->{$str}($value);

            return;
        }

        if (array_search($key, $this->fillable) !== false) {
            $this->attributes[$key] = $value;
        }
    }