shadowfax
shadowfax copied to clipboard
Run Laravel on Swoole.
BaseController.php ``` class BaseAgentController extends Controller { /** * @var $user Collection */ protected $user; public function __construct() { //执行中间件获取用户信息 $this->middleware(function ($request, $next) { $this->user = collect(Auth::user())->except(['permissions', 'roles']); return $next($request);...
QueryLoggerServiceProvider.php ```php DB::listen(function (QueryExecuted $query) { if ($query->time < $this->app['config']->get('logging.query.slower_than', 0)) { return; } $sqlWithPlaceholders = str_replace(['%', '?'], ['%%', '%s'], $query->sql); $bindings = $query->connection->prepareBindings($query->bindings); $pdo = $query->connection->getPdo(); $realSql = $sqlWithPlaceholders;...
laravel/lumen-framework: 8.2.1 overtrue/laravel-wechat: 6.0.0 huang-yi/shadowfax: 2.10.3 获取 easywechat 实例 ```php $wechat = app('wechat.mini_program.default') $wechat->auth->session($code); // 报错为: access_token null $wechat = Factory::miniProgram(config('wechat.mini_program.default')); $wechat->auth->session($code); // 报错: access_token null ``` 切换为 php-fpm 后,...
第一次尝试laravel+swoole的项目搭建,第一次使用作者的扩展包,感觉一切好神奇。 自己现在本地的虚拟机跑一段时间,如果没什么问题,尝试搬到线上。 感谢作者!
返回回来的 code 一直失效或者二次使用, 导致无法获取用户信息. log ```bash [2020-10-09 10:14:19] production.ERROR: 获取用户信息失败 {"msg":"Authorize Failed: {\"errcode\":40163,\"errmsg\":\"code been used, hints: [ req_id: GEeEWaMre-GRQona ]\"}"} [2020-10-09 10:14:20] production.ERROR: 获取用户信息失败 {"msg":"Authorize Failed: {\"errcode\":40029,\"errmsg\":\"invalid code, hints: [...
```bash [2020-08-26 15:31:00] production.ERROR: SQLSTATE[HY000]: General error: 2014 Cannot execute queries while other unbuffered queries are active. Consider using PDOStatement::fetchAll(). Alternatively, if your code is only ever going to run...
Task::dispatch($task); 投递任务的时候出现Target class [shadowfax.task] does not exist.错误 依照文档https://shadowfax.huangyi.tech/docs/2.x/task来执行操作
接入微信后台的客服api route/api.php ```php $router->any('wechat/serve', 'WechatMiniCustomerController@serve'); ``` 控制器方法 ```php public function serve() : Response { $app = $this->getMiniProgram(); $customerService = $app->customer_service; $app->server->push(static function ($message) use ($customerService) { if (isset($message['MsgType']) && 'miniprogrampage'...
PHP 7.3 Swoole 4.5.2 ``` php shadowfax start --watch ``` 显示以下错误,修改文件无法自动重启服务器。fswatch单独运行正常。 PHP Fatal error: Uncaught HuangYi\Watcher\Exceptions\InvalidOutputException: Error: Unknown event type: 414 in /www/wwwroot/pro.yenomcmf.com/vendor/huang-yi/swoole-watcher/src/Commands/Fswatch.php:124 Stack trace: #0 /www/wwwroot/pro.yenomcmf.com/vendor/huang-yi/shadowfax/src/Console/StartCommand.php(278): HuangYi\Watcher\Commands\Fswatch->parseEvents('Error: Unknown ...')...
Octobercms : https://github.com/octobercms/october 是否可以帮忙解决下兼容问题?