$item->getRouteKey(), 'key' => [ 'public' => $item->getPublicKey(), 'route' => $item->getRouteKey(), ], 'purchase_order_id' => $item->purchase_order_id, 'item_id' => $item->item_id, 'code' => $item->code, 'uom' => $item->uom, 'tax_id' => $item->tax_id, 'date' => $item->date, 'qty' => $item->qty, 'unit_price' => $item->unit_price, 'discount' => $item->discount, 'subtotal' => $item->subtotal, 'deleted_at' => $item->deleted_at, 'url' => [ 'public' => trans_url('purchase/'.$item->getPublicKey()), 'user' => guard_url('purchase/item/'.$item->getRouteKey()), ], 'status' => trans('app.'.$item->status), 'created_at' => format_date($item->created_at), 'updated_at' => format_date($item->updated_at), ]; } }