Slim 3,How to use a function that can be used for the validate of arguments in all routes?
pic 1
pic2
require the namespaced file in the index.php(pic 1) or use composer to autoload it(pic 2)
use the namespace.
instantiating the class.
Use app middleware to parse the route args.