*/ class UseDatabaseTransactions { /** * Handle the current command in the pipeline. * * @param mixed $command * @param \Closure $next * * @return bool */ public function handle($command, Closure $next) { return DB::transaction(function () use ($command, $next) { return $next($command); }); } }