laravel-async icon indicating copy to clipboard operation
laravel-async copied to clipboard

Sorry but It doesn't work for me

Open vlauciani opened this issue 1 year ago • 3 comments

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.

vlauciani avatar Jun 21 '23 15:06 vlauciani

Can you retry on latest version?

vuongxuongminh avatar Jul 16 '23 06:07 vuongxuongminh

Same it just didn't work

gofortiss avatar Dec 02 '23 09:12 gofortiss

its same error https://github.com/vuongxuongminh/laravel-async/issues/34

ijazahmedbhatti avatar Jan 19 '24 17:01 ijazahmedbhatti