larahook / async-helper
Async call
Installs: 3
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/larahook/async-helper
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