Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

how to return variable from transaction Laravel

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

}
Source by laracasts.com #
 
PREVIOUS NEXT
Tagged: #return #variable #transaction #Laravel
ADD COMMENT
Topic
Name
4+9 =