目录结构:

能正确加载的类库:
namespace Common\Wechat;
class Wechat
{
..........
}不能正确加载的类库:namespace Common\Githubhook;
class Githubhook
{
.......
}类在某控制器下的使用:use \Common\Wechat\Wechat as Wechat;
use \Common\Githubhook as Githubhook;
$this->wechat = new Wechat($options);
$hook = new Githubhook; 最佳答案