In the route, it replaces with the controller method dependencies.
class ShowBudgetRequest extends BaseRequest
{
public function __construct(
#[FromRouteParameter('teamTwrn')]
public Twrn $teamTwrn,
#[FromRouteParameter('budgetTwrn')]
public Twrn $budgetTwrn,
) {
}
}
class BudgetController extends Controller
{
public function show(GetBudgetCommand $command, ShowBudgetRequest $request)
{
// ...
}
}
And a route /team/{teamTwrn}/budgets/{budgetTwrn} will generate to /team/{command}/budgets/{request}
In the route, it replaces with the controller method dependencies.
And a route
/team/{teamTwrn}/budgets/{budgetTwrn}
will generate to/team/{command}/budgets/{request}