marshmallow/simple-value-metric

一个 Laravel Nova 卡片。

v2.1.0 2023-10-24 08:23 UTC

README

这是一个用于创建简单指标卡片的包。

安装

composer require marshmallow/simple-value-metric

用法

您可以通过将以下代码添加到您的 cards 方法中来添加此指标。

// ...
protected function cards()
{
	(new SimpleValueMetric)
	    ->title('Scored quotations')
	    ->calculate(
	        function ($simple_value) {
	            return $simple_value->formattedValue(72)
	                                ->footer(
	                                    '99% of the quotations are orders!'
	                                );
	        }
	    )->help('72 of a total of 73 quotations are now orders :)'),
	// ...
}

安全性

如果您发现任何与安全性相关的问题,请通过电子邮件 stef@marshmallow.dev 而不是使用问题跟踪器来报告。

许可证

MIT 许可证 (MIT)。有关更多信息,请参阅 许可证文件