|
@@ -69,7 +69,7 @@ class GetFromLaravelAPI extends Strategy
|
|
|
$type = $this->normalizeTypeName($typeName);
|
|
|
$parameters[$paramName]['type'] = $type;
|
|
|
|
|
|
- $example = optional($argumentInstance::first())->id;
|
|
|
+ $example = $argumentInstance::first()->id ?? null;
|
|
|
|
|
|
if($example === null) {
|
|
|
// If the user explicitly set a `where()` constraint, use that to refine examples
|