original_string: public function allTransactions(int $id)
      {
          /** @var HasTransactionsInterface $object */
          if(!$object = $this->repository->find($id)) {
              abort(404);
          }
  
          $transactions = $object->getLatestTransactions();
  
          return TransactionResource::collection($transactions);
      }
code: public function allTransactions(int $id)
      {
          /** @var HasTransactionsInterface $object */
          if(!$object = $this->repository->find($id)) {
              abort(404);
          }
  
          $transactions = $object->getLatestTransactions();
  
          return TransactionResource::collection($transactions);
      }
code_tokens: public function allTransactions ( int $ id ) { /** @var HasTransactionsInterface $object */ if ( ! $ object = $ this -> repository -> find ( $ id ) ) { abort ( 404 ) ; } $ transactions = $ object -> getLatestTransactions ( ) ; return TransactionResource :: collection ( $ transactions ) ; }
docstring: Get latest Transactions
  
  Get all transactions order by created desc for given model find by model primary id
  
  @param int $id
  
  @return AnonymousResourceCollection|TransactionResource[]
docstring_tokens: Get latest Transactions