#How to organize modules for pages ?
18 messages · Page 1 of 1 (latest)
A page is a View. Controllers serve views. I would apply the same logic for pages as for "response dtos", that is, keep them in the module that they come from.
I have a contact form in my landing page. Where would I put that ?
In the app.controller ?
I need a method in a controller that takes the post data and sends the email
Submission of the form generates a POST request, so you should handle that in the controller. The form itself would be rendered by the template
thanks but what module would you put that in ?
would you make a Contact module
or a Form module ?
or just put that in app
I'm trying to figure out what would be the appropriate way to organize it
the form has no associated entity so it's not straight forward to categorize in a module
Seems like a solid choice.