Open manunoly opened 11 months ago
I can confirm this bug. will take a look at it.
but as a workaround I was able to use request()
helper inside the closure.
Hi @saeedvaziry
Did you manage to resolve this issue? I’m currently encountering the same problem that @manunoly mentioned. You mentioned that you were able to use the request() helper. I tried it, but I’m still unable to resolve the issue.
Hello @saeedvaziry nice package, this can be the missing piece that PHP is needing,
if I pass any variable is working fine
AsyncHandler::dispatch(function () use ($user) { logger('test'); });
but if you pass the $request object to AsyncHandler::dispatch fn, I always get a 500 error, it's the expected behave or I'm missing something,
AsyncHandler::dispatch(function () use ($request) { logger('test'); });