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 c892092 commit b08bbd6Copy full SHA for b08bbd6
1 file changed
src/Traits/ModelTrait.php
@@ -104,7 +104,19 @@ protected function getWith(): array
104
*/
105
protected function getWithout(): array
106
{
107
- return empty($this->without) ? [] : $this->without;
+ // Ensure $this->without is set at all
108
+ if (empty($this->without))
109
+ {
110
+ $this->without = [];
111
+ }
112
+
113
+ // Force a single table name into an array
114
+ if (! is_array($this->without))
115
116
+ $this->without = [$this->without];
117
118
119
+ return $this->without;
120
}
121
122
/**
0 commit comments