$payload->branch->id, 'series' => $payload->data['series'], 'is_start' => true]); $payload->series = $this->createSeriesCommand->execute($seriesPayload->toArray()); return $next($payload); } catch (\Exception $exception) { throw new \LogicException('Failed to create branch series', $exception->getMessage()); } } }