When creating a new rout it doesn't use dependency injection
There are 2 problems with the route:
First Issue
Using the tramway creat:route a new route is created, however, in the created route the controller doesn't use dependency injection, instead it new ups a new controller.
example:
tramway create:route UserController signup user/signup --methods post
{
"controller": new UserController(),
"action": "signup",
"path": "user/signup",
"methods": ["post"]
},
Second Issue
The rout file is not created in the correct location. This causes the 'route not found' error to be generated.
Edited by Mahdi Eftekhari Moghaddam