public getAttribute ( string $key ) : mixed | ||
$key | string | |
return | mixed |
public function getAttribute($key)
{
if (method_exists($this, $key)) {
return $this->getRelationValue($key);
}
return parent::getAttribute($this->getSnakeKey($key));
}