我有控制器,我需要从另一个控制器访问操作并返回数据:
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;
}
Run Code Online (Sandbox Code Playgroud)
soap/controllers/BController
public actionRequest1{
//do something and return data to AController
}
public actionRequest2{
//do something and return data to AController
}
Run Code Online (Sandbox Code Playgroud)
我怎样才能做到这一点?