我似乎无法获得Nova的格式以使Value Metrics发挥作用。当我将属性添加到返回中时,什么也没发生。
任何提示可能有什么问题吗?
$total = DB::table(hello')->sum(DB::raw('bye'));
return $this->result($total)->format("0,0");
您必须返回一个对象,例如:
return (new ValueResult($total))
->currency('$ ')
->format('0,0');