@erron you can create a route to /departments/delete/ and always return an error message that they need to pass the required parameter.
Mar 23, 2021
4
Level 5
How to validate route parameters?
I am having issues if there is an instance where the client request without route parameters like '/departments/delete/'. I get 405 Method Not Allowed error. How can I validate something like this where I can return a custom error message that no data has been passed?
Please or to participate in this conversation.