where do you handle the POST requests? where do you write the validation rules and flash error messages? where do you write save to db code? (mainly i want to know how do you route a POST request to a controller and where do you write the controller?)


You'd do this wiht a Craft plugin or module.

Try giving the plugin docs a once over: https://docs.craftcms.com/v3/extend and if you have some specific questions, feel free to post back.

You can also generate Craft plugin boilerplate code at https://pluginfactory.io that already has a lot of this setup for you.

  • i never thought my quetsion would get answered ,thanx a lot man...btw i already knew that much. – jamesSeb Mar 27 '20 at 5:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.