Controllers

In business suite plugin development, controller is a simple php file.

Below is an example of a basic controller file inside plugin folder with name app.php -

<?php
_auth();

$action = route(2);

switch ($action) {

    case 'list':

        // url - <Your URL>notes/app/list
        // display all notes

        break;


    case 'add':

        // add a new note


        break;


    case 'save':
        
        break;


    case 'view':


        break;


    case 'edit':

        $id = route(3);


        break;


    case 'delete':

        $id = route(3);


        break;


}