Skip to content

Commit

Permalink
Set idName correctly when using nested routes and dasherize
Browse files Browse the repository at this point in the history
  • Loading branch information
aceat64 authored and markstory committed Nov 28, 2015
1 parent 2f758b0 commit f79782b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Routing/RouteBuilder.php
Expand Up @@ -344,7 +344,7 @@ public function resources($name, $options = [], $callback = null)
}

if (is_callable($callback)) {
$idName = Inflector::singularize($urlName) . '_id';
$idName = Inflector::underscore(Inflector::singularize($name)) . '_id';
$path = '/' . $urlName . '/:' . $idName;
$this->scope($path, [], $callback);
}
Expand Down

0 comments on commit f79782b

Please sign in to comment.