I'm trying to call an external controller which is outside of App
. Example path project\\domains\\service\\onion\\controllers\\SignupController.php
. In my App->controller
got this class exampleController
. So I try to get the function from SignupController
.
Code
use Project\domains\service\onion\controllers\SignupController;
Class exampleController extends \RestController
{
public function grap()
{
$result = App::make('SignupController')->store();
}
}
Got error: Project\\domains\\service\\onion\\controllers\\SignupController not found
你可以试试
(new SignupController())->methodOfSignupController();
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.