laravel-async
laravel-async copied to clipboard
Sorry but It doesn't work for me
Hi
After two days of desperate attempts, I am asking for your help
I'm using Laravel 9 and to start using the package I create a simple method like this:
use VXM\Async\AsyncFacade as Async;
class AsyncController extends Controller
public function async()
{
for ($i = 1; $i < 20; $i++) {
Async::run(function () use ($i) {
sleep(1);
return $i;
});
}
var_dump(implode(', ', Async::wait()));
}
}
the file routes/api.php
contains something like:
Route::get('/async', 'AsyncController@async');
Asking the GET
url: http://localhost/api/location/v2/async
I can see only:
string(0) ""
Where am I going wrong?
Thank you.
Can you retry on latest version?
Same it just didn't work
its same error https://github.com/vuongxuongminh/laravel-async/issues/34