Introduction
Controllers help organize your code by handling user requests and sending responses. Methods inside controllers define what happens for each action.
When you want to handle a form submission and save data.
When you need to show a list of items from the database.
When you want to update or delete a resource based on user input.
When you want to separate your app logic from routes for cleaner code.