larahook / async-helper
Async call
v1.0.5
2026-01-14 07:07 UTC
Requires
- php: ^8.0
- laravel/framework: ^10.0|^11.0|^12.0
README
Example
// Base code echo 'a'; AsyncHelper::call(static function () { // Some async logic with separate database connection $response = Http::get('http://example.com/users'); $data = $response->json(); foreach ($data as $userItem) { SomeUserModel::updateOrCreate($userItem); } echo 'c'; }); echo 'b'; // Result: // 'a' // 'b' // 'c' // hidden echo