File tree Expand file tree Collapse file tree 1 file changed +3
-10
lines changed Expand file tree Collapse file tree 1 file changed +3
-10
lines changed Original file line number Diff line number Diff line change @@ -260,18 +260,11 @@ protected static function handleFields(
260
260
261
261
protected static function isMongodbInstance (GraphqlType $ parentType ): bool
262
262
{
263
- $ jenssegersMongoType = 'Jenssegers\Mongodb\Eloquent\Model ' ;
264
- $ laravelMongoType = 'MongoDB\Laravel\Eloquent\Model ' ;
263
+ $ mongoType = 'MongoDB\Laravel\Eloquent\Model ' ;
265
264
266
- if (isset ($ parentType ->config ['model ' ])) {
267
- $ modelInstance = app ($ parentType ->config ['model ' ]);
268
-
269
- return $ modelInstance instanceof $ jenssegersMongoType || $ modelInstance instanceof $ laravelMongoType ;
270
- }
271
-
272
- return false ;
265
+ return isset ($ parentType ->config ['model ' ]) ? app ($ parentType ->config ['model ' ]) instanceof $ mongoType : false ;
273
266
}
274
-
267
+
275
268
/**
276
269
* @param string|Expression $field
277
270
* @param array $select Passed by reference, adds further fields to select
You can’t perform that action at this time.
0 commit comments