marshmallow/simple-value-metric

v2.0.4 2022-06-15 08:56 UTC

README

This is a package to create a simple metric card.

screenshot.png

Installation

composer require marshmallow/simple-value-metric

Usage

You can add this metric by adding the code like below to your cards method.

// ...
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 :)'),
	// ...
}

Security

If you discover any security related issues, please email stef@marshmallow.dev instead of using the issue tracker.

License

The MIT License (MIT). Please see License File for more information.