I have controller where I need to access an action from another controller and return data:
rest/controllers/AController
switch (@$_GET['barcodeType'])
{
case '1D':
{
//do action Request1 from BController and return data from
this controller
}
break;
case '2D':
{
//do action Request2 from BController and return data from
this controller
}
break;
default:
return ['Wrong barcodeType'];
break;
}
soap/controllers/BController
public actionRequest1{
//do something and return data to AController
}
public actionRequest2{
//do something and return data to AController
}
How can I do this?
actionare you referring any simple function inside that controller or anactionFunction- Muhammad Omer Aslam$barcodeand then call function depending on passedbarcodeType. Don't call different controller actions. Greetings for Human-Device. - Yupik