nr: #2 dodano: 2016-12-27 18:12
Here is what I did to fix:
['parameters' => [
'computer-software-version-installation' => 'installation'
Why is this necessary?
For Laravel 5.3, here is the extended answer:
resource method creates a new ResourceRegistrar to register the routes. This method as an
register method will set the parameters attribute to the
$options['parameters'] value, then calls
getResourceWildcard to set the
$base variable value using the last part of the
$name as the input parameter.
getResourceWildcard method will look through the parameters to see if there is a value, and use it if there is. Otherwise it goes through some gyrations to make a string.
So if we pass in a
'parameters' array with a key that matches the route name, and the value equal to the place-holder name, we can avoid the error.
The issue with
getResourceWildcard was mentioned here:
but seemed to be rebutted here as a Symphony issue?
Hopefully, this answer helps someone else with a work around. But it has not been extensively tested, so it may still have problems.