We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 24fc129 commit 127334aCopy full SHA for 127334a
src/Illuminate/Database/Eloquent/Builder.php
@@ -73,6 +73,15 @@ class Builder
73
*/
74
protected $onDelete;
75
76
+ /**
77
+ * The properties that should be returned from query builder.
78
+ *
79
+ * @var string[]
80
+ */
81
+ protected $propertyPassthru = [
82
+ 'from',
83
+ ];
84
+
85
/**
86
* The methods that should be returned from query builder.
87
*
@@ -1600,6 +1609,10 @@ public function __get($key)
1600
1609
return new HigherOrderBuilderProxy($this, $key);
1601
1610
}
1602
1611
1612
+ if (in_array($key, $this->propertyPassthru)) {
1613
+ return $this->toBase()->{$key};
1614
+ }
1615
1603
1616
throw new Exception("Property [{$key}] does not exist on the Eloquent builder instance.");
1604
1617
1605
1618
0 commit comments