Symfony 4 - KnpPaginator Bundle “service not found, even though it exists in app's container”

后端 未结 4 778
青春惊慌失措
青春惊慌失措 2021-01-12 00:01

I have been following tutorials, and all instructions show it\'s done the exact same way, but it doesn\'t seem to work in Symfony 4. Is there something I\'m overlooking or i

4条回答
  •  隐瞒了意图╮
    2021-01-12 00:14

    In my case i'm using symfony 4.3, I just injected the class to the methods as an argument and i'm done.

    public function list(ProductManager $productManager)
    { 
       $products = $productManager->prepareProducts(); 
       return $products;
    }
    

提交回复
热议问题