@@ -140,6 +140,11 @@ class Api
140140 */
141141 private $ transactions ;
142142
143+ /**
144+ * @var string|null
145+ */
146+ private $ modelNamespace ;
147+
143148 /**
144149 * Api constructor.
145150 *
@@ -156,6 +161,7 @@ class Api
156161 * @param array $providers
157162 * @param string|null $connection
158163 * @param bool $transactions
164+ * @param string|null $modelNamespace
159165 */
160166 public function __construct (
161167 Factory $ factory ,
@@ -170,7 +176,8 @@ public function __construct(
170176 array $ errors = [],
171177 array $ providers = [],
172178 string $ connection = null ,
173- bool $ transactions = true
179+ bool $ transactions = true ,
180+ string $ modelNamespace = null
174181 ) {
175182 $ this ->factory = $ factory ;
176183 $ this ->resolver = $ resolver ;
@@ -185,6 +192,7 @@ public function __construct(
185192 $ this ->providers = $ providers ;
186193 $ this ->connection = $ connection ;
187194 $ this ->transactions = $ transactions ;
195+ $ this ->modelNamespace = $ modelNamespace ;
188196 }
189197
190198 /**
@@ -384,6 +392,16 @@ public function hasTransactions(): bool
384392 return $ this ->transactions ;
385393 }
386394
395+ /**
396+ * @return string|null
397+ */
398+ public function getModelNamespace (): ?string
399+ {
400+ return $ this ->modelNamespace ;
401+ }
402+
403+
404+
387405 /**
388406 * Create an encoder for the API.
389407 *
0 commit comments