From 2971c1c333c829097c7256e5881e803f7d172d2f Mon Sep 17 00:00:00 2001 From: Aqqil Azman Date: Fri, 31 May 2024 11:21:31 +0800 Subject: [PATCH] created Fetch Remarks from Transaction Logic --- .../FetchTransactionRemarksLogic.php | 49 +++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 app/Classes/Modules/Transactions/ControllersLogic/FetchTransactionRemarksLogic.php 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)); + + } + + + +}