method

app_middleware

app_middleware()
public

This allows you to modify the application’s middlewares from Engines.

All operations you run on the app_middleware will be replayed on the application once it is defined and the default_middlewares are created