Documentation

Controllers

You can organize your controllers inside the My/Controllers folder and call them within the pages located in the project's "public" folder.

To create a new controller, you can create a brand new file in the My/Controllers folder of your project and follow the logic above:

<?php
    namespace My\Controllers;

    class Course extends \My\Controller
    {
        public static function init()
        {
            echo "This is the courses page";
        }
    }
?>