I am developping a Symfony3 application that will have a web interface but a Mobile Interface too (probably Ionic). So far I have created a REST-API using FOSRestBundle and NelmioApiDocBundle (amazing stuff btw.) and I can view/create/delete entities with the NelmioApiDocBundle Sandbox feature. With other words I have created the Controllers that implement a CRUD but also include transactions and event handling.
Now I'd like to also provide a web interface for some of those entities, so I created corresponding controllers and find myself duplicating createForm/submit/isValid etc. It would be nice if I could just delegate the form handling (POSTs) to the API controllers which already handle persistence and logic, but I'm running into quicksand.
Has anybody tried something like this or has a suggestion how to tackle such a situation? Any answer is hightly appreciated. Jorgo