diff --git a/app/Classes/Modules/Transactions/ControllersLogic/FetchTransactionRemarksLogic.php b/app/Classes/Modules/Transactions/ControllersLogic/FetchTransactionRemarksLogic.php new file mode 100644 index 00000000..703cb14b --- /dev/null +++ b/app/Classes/Modules/Transactions/ControllersLogic/FetchTransactionRemarksLogic.php @@ -0,0 +1,49 @@ +listsTransactions = $listsTransactions; + } + + /** + * @return array + */ + protected function notification():array { + return [ + 'title' => 'Retrieved Transactions', + 'message' => 'You have successfully retrieved a list of transactions' + ]; + } + + /** @var ListsTransactions */ + private $fetchesTransaction; + + public function logic(Request $request) : JsonResponse + { + + $query = $this->fetchesTransaction->execute(['id' => $request->route('id')]); + + $remakrs = $query->remarks; + + return $this->collectionResponse(RemarkResource::collection($remakrs)); + + } + + + +}