diff --git a/src/Node/GetAttrNode.php b/src/Node/GetAttrNode.php index 82d2ea15..47bd0656 100644 --- a/src/Node/GetAttrNode.php +++ b/src/Node/GetAttrNode.php @@ -129,7 +129,7 @@ public static function attribute( $sandboxed = false, int $lineno = -1 ) { - if (Template::METHOD_CALL !== $type and is_a($object, 'Illuminate\Database\Eloquent\Model')) { + if (Template::METHOD_CALL !== $type and (is_a($object, 'Illuminate\Database\Eloquent\Model') || is_a($object, 'Livewire\Component'))) { // We can't easily find out if an attribute actually exists, so return true if ($isDefinedTest) { return true;