diff --git a/user_guide_src/source/incoming/controllers.rst b/user_guide_src/source/incoming/controllers.rst index 113e9a50d5df..1f75bc872c9e 100644 --- a/user_guide_src/source/incoming/controllers.rst +++ b/user_guide_src/source/incoming/controllers.rst @@ -11,7 +11,9 @@ Controllers are the heart of your application, as they determine how HTTP reques What is a Controller? ********************* -A Controller is simply a class file that handles a HTTP request. :doc:`URI Routing ` associates a URI with a controller. +A Controller is simply a class file that handles a HTTP request. +:doc:`URI Routing ` associates a URI with a controller. It returns a +view string or ``Response`` object. Every controller you create should extend ``BaseController`` class. This class provides several features that are available to all of your controllers. diff --git a/user_guide_src/source/installation/upgrade_controllers.rst b/user_guide_src/source/installation/upgrade_controllers.rst index cd5f17fd3d22..1a2dc9a9b4ce 100644 --- a/user_guide_src/source/installation/upgrade_controllers.rst +++ b/user_guide_src/source/installation/upgrade_controllers.rst @@ -20,6 +20,8 @@ What has been changed - CI4 provides :doc:`Request ` and :doc:`Responses ` objects for you to work with - more powerful than the CI3-way. - If you want a base controller (``MY_Controller`` in CI3), use **app/Controllers/BaseController.php**. +- Calling ``echo`` within Controllers, as in CI3, is still supported, but + it is recommended that a string or Response object be returned from Controllers. Upgrade Guide =============