You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Through my API I already have a route that receives parameters and creates users, this works perfectly for me. However, I would like to implement an HTML form for the API to provide API clients, the form must be able to access the method (to the database model), so that from the same form you can create the users.
I already have the simple form in HTML.
The question is: How do I access the slim models, so that, once the values of the form have been obtained, I will be able to send them to the model to create the user.
the form must be able to access the method (to the database model),
This would break the basic MVC principles, because the "View" layer should not fetch data from somewhere. All the the data should be passed to the View renderer instead.
How do I access the slim models, so that, once the values of the form have been obtained, I will be able to send them to the model to create the user.
You can handle all these operations in the action handler or better in a use case specific (Application) Service.
Through my API I already have a route that receives parameters and creates users, this works perfectly for me. However, I would like to implement an HTML form for the API to provide API clients, the form must be able to access the method (to the database model), so that from the same form you can create the users.
I already have the simple form in HTML.
The question is: How do I access the slim models, so that, once the values of the form have been obtained, I will be able to send them to the model to create the user.
My route to create users:
My route to show the form:
Ambos están dentro del mismo grupo de la ruta de slim.
The text was updated successfully, but these errors were encountered: