I am using the approach detailed here to add a restore method to my resource routes. I think it's an elegant solution to what would be a very messy routes file if a separate route had to be applied to each resource.
The problem I have is that I have deeply nested routes which resolve the component models prior to hitting the controller, and which automatically apply WHERE deleted_at IS NULL to queries. I am therefore getting 404 errors when I hit the restore method in my controllers.
Can anyone suggest an elegant way of getting around this for the custom restore method I have assigned to my resource routes?
Ideally it would only be the last parameter of the route that should be selecting withTrashed().
Thanks