Skip to content
Advertisement

How can I use UserPasswordEncoderInterface without declaring it in function parameter

How can I use UserPasswordEncoderInterface without having to declare it as a function parameter? I would like to use this method somewhere else and because of that I can’t.

JavaScript

Advertisement

Answer

If you use autowire: true in your config you can inject the service. docs

JavaScript
User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement