marshmallow/simple-value-metric

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

README

This is a package to create a simple metric card.

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.