src/Http/Controllers/UssdController.php
public function continueUssdMenuProcess($user,$message){

        $menu = ussd_menu::find($user->menu_id);

        //check the user menu
        switch ($menu->type) {
            case 0:
                //authentication mini app

                break;
            case 1:
                //continue to another menu
                $response = self::continueUssdMenu($user,$message,$menu);
                break;
            case 2:
                //continue to a processs
                $response = self::continueSingleProcess($user,$message,$menu);
                break;
            case 3:
                //infomation mini app
                //
                self::infoMiniApp($user,$menu);
                break;
            default :
                self::resetUser($user);
                $response = "An error occurred";
                break;
        }

        return $response;

    }
public function continueUssdMenuProcess($user,$message){

        $menu = ussd_menu::find($user->menu_id);

        //check the user menu
        switch ($menu->type) {
            case 0:
                //authentication mini app

                break;
            case 1:
                //continue to another menu
                $response = self::continueUssdMenu($user,$message,$menu);
                break;
            case 2:
                //continue to a processs
                $response = self::continueSingleProcess($user,$message,$menu);
                break;
            case 3:
                //infomation mini app
                //
                self::infoMiniApp($user,$menu);
                break;
            default :
                self::resetUser($user);
                $response = "An error occurred";
                break;
        }

        return $response;

    }
public function continueUssdMenuProcess ( $ user , $ message ) { $ menu = ussd_menu :: find ( $ user -> menu_id ) ; //check the user menu switch ( $ menu -> type ) { case 0 : //authentication mini app break ; case 1 : //continue to another menu $ response = self :: continueUssdMenu ( $ user , $ message , $ menu ) ; break ; case 2 : //continue to a processs $ response = self :: continueSingleProcess ( $ user , $ message , $ menu ) ; break ; case 3 : //infomation mini app // self :: infoMiniApp ( $ user , $ menu ) ; break ; default : self :: resetUser ( $ user ) ; $ response = "An error occurred" ; break ; } return $ response ; }
continue USSD Menu Progress
continue USSD Menu Progress