relations)) { return parent::getAttribute($key); } else { return parent::getAttribute(Str::snake($key)); } } /** * Set a given attribute on the model. * * @param string $key * @param mixed $value * @return mixed */ public function setAttribute($key, $value) { return parent::setAttribute(Str::snake($key), $value); } }