create menu provider as middleware