I've defined a route in web.php that looks like this:
Route::delete('/app/charges-for-order/{orderId}', 'AppController@deleteOrderCharges');
It seems to work well apart from when orderId has a forward slash in it. Eg 11/11.
Naturally my first port of call was to generate the url in the frontend using encodeURIComponent:
/app/charges-for-order/${encodeURIComponent(orderId)} (in javascript)
Which produces the url /app/charges-for-order/11%2F11, replacing the forward slash with %2F -- however, this is giving me a 404, as if Laravel is still seeing %2F as a forward slash for routing purposes.
How can I allow orderId to have (encoded) forward slashes and still be part of the URL like that? Is there some alternate encoding scheme that Laravel will respect in this context?

I assume you are using Apache as HTTP server? At least Apache is by default decoding
%2Fbehind your back: https://httpd.apache.org/docs/2.4/mod/core.html#allowencodedslashesChanging this might be a bad idea, so I would suggest you would change your route to match all: