3 years ago

How to add middleware to middleware group based on enviroment

Posted 3 years ago by vedmant

Hi, I have one issue with middlewares, I want to add my custom middleware to "api" middleware group, but only for development and local environment, but in Kernel.php all groups statically typed in the property protected $middlewareGroups = []; Is there a was to add/edit group middleware dynamically?

Please sign in or create an account to participate in this conversation.