'Create Supplier Transactions', 'message' => 'You have successfully created currency supplier transactions' ]; } /** @var FetchesPackingList */ private $fetchesPackingList; /** @var CreateInvoiceTransactionProcessor */ private $createInvoiceTransactionProcessor; /** * @param FetchesPackingList $fetchesPackingList * @param CreateInvoiceTransactionProcessor $createInvoiceTransactionProcessor */ public function __construct(FetchesPackingList $fetchesPackingList, CreateInvoiceTransactionProcessor $createInvoiceTransactionProcessor) { $this->fetchesPackingList = $fetchesPackingList; $this->createInvoiceTransactionProcessor = $createInvoiceTransactionProcessor; } public function logic(Request $request) : JsonResponse { $packing_list = $this->fetchesPackingList->execute(['id' => $request->input('packing_list_id')]); $this->createInvoiceTransactionProcessor->execute($packing_list); return $this->response([]); } }