帮看看哪里有问题
public function serve()
{
$options = [
'app_id' => 'xxxxxxxxx',
'secret' => 'xxxxxxxx',
'token' => 'xxxxxxxx',
'log' => [
'level' => 'debug',
'file' => '/tmp/easywechat.log',
],
];
$app = Factory::miniProgram($options);
$server = $app->server;
$server->push(function($message) use ($app){
Log::info($message);
if($message['MsgType'] == 'event' && $message['Event'] == 'user_enter_tempsession') {
$this->enterEventMsg($message);
}else{
$t = new Transfer();
return $t;
}
return "666";
});
$server->serve()->send();
}