Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sorry but It doesn't work for me #37

Open
vlauciani opened this issue Jun 21, 2023 · 3 comments
Open

Sorry but It doesn't work for me #37

vlauciani opened this issue Jun 21, 2023 · 3 comments

Comments

@vlauciani
Copy link

vlauciani commented Jun 21, 2023

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.

@vuongxuongminh
Copy link
Owner

Can you retry on latest version?

@gofortiss
Copy link

Same it just didn't work

@ijazahmedbhatti
Copy link

its same error #34

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants