how to return variable from transaction Laravel code example
Example: how to return variable from transaction Laravel
$result = null;
DB::transaction(function () use(&$result) {
// logic here
$result = someGetResult();
});
if ($result != null) {
}