mirror of
https://github.com/ambieco/scribe.git
synced 2026-05-02 05:25:12 +08:00
Update ExtractedEndpointData.php
This commit is contained in:
@@ -154,7 +154,7 @@ class ExtractedEndpointData extends BaseDTO
|
||||
|
||||
// We'll replace with {id} by default, but if the user is using a different key,
|
||||
// like /users/{user:uuid}, use that instead
|
||||
$binding = static::getFieldBindingForUrlParam($route, $singularResource, 'id');
|
||||
$binding = static::getFieldBindingForUrlParam($route, $singularResource, $singularResourceParam);
|
||||
|
||||
if (!$foundResourceParam) {
|
||||
// Only the last resource param should be {id}
|
||||
@@ -203,6 +203,7 @@ class ExtractedEndpointData extends BaseDTO
|
||||
if (method_exists($route, 'bindingFieldFor')) {
|
||||
$binding = $route->bindingFieldFor($paramName);
|
||||
}
|
||||
|
||||
return $binding ?: $default;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user