thinkphp5.0 calls code across modules

thinkphp differentiates code by module and wants to call code across modules (like logic).

For example, there are two modules wx under application, web, and each module has controller, view, logic and so on. Want to call wx/logic/WxLogic.php in web/controller/Index.php

<?php
...

class Index{
   public function index(){
       //wxlogic
       $wxLogic=model('wx/WxLogic','logic');
       ...
       ...
   }
}

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325558591&siteId=291194637