Answers for "laravel db transaction use variable"

1

how to return variable from transaction Laravel

$result = null;
DB::transaction(function () use(&$result) { 
    // logic here
    $result = someGetResult();
});
if ($result != null) {

}
Posted by: Guest on May-16-2021

Code answers related to "laravel db transaction use variable"

Browse Popular Code Answers by Language