John Davidson

php - you forgot to register the controller as a service or missed tagging it with the "controller.service_arguments"?

0 comments
Message:


I am beginner to symfony. When I calling get API in symphony,Showing error like below.


RuntimeException
HTTP 500 Internal Server Error
Could not resolve argument $salesteamRepository of "App\Controller\SalesController::index()", maybe you forgot to register the controller as a service or missed tagging it with the "controller.service_arguments"?


My Answer:
appropriate service tag. Make sure to register the controller as a service in your Symfony configuration file and tag it with the appropriate service tag, such as `controller.service_arguments`. This will allow Symfony to properly inject the controller into your application and make it available for use.

Rate this post

3 of 5 based on 3573 votes

Comments




© 2024 Hayatsk.info - Personal Blogs Platform. All Rights Reserved.
Create blog  |  Privacy Policy  |  Terms & Conditions  |  Contact Us