I'm creating manual function inside dispatch laravel. Do anyone know how to pass variable into the dispatch function()?
$new_user = UserAccount::create($input);
$registered_id = $new_user->ID;
dispatch(function () {
return $registered_id;
})->afterResponse();
dispatch(function () use ($registered_id) {
return $registered_id;
})->afterResponse();
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.