I have a class named Middleware and all the middlewares are declared as static functions in that class. How can I pass any of the function to use it as middleware. I tried following code but it does not work.
$app->use(Middlewares::setDeveloperHeader); // Here setDeveloperHeader is a public static function of class Middlewares
I have a class named Middleware and all the middlewares are declared as static functions in that class. How can I pass any of the function to use it as middleware. I tried following code but it does not work.
Any help would be appreciated.