PHP code example of marshmallow / simple-value-metric
1. Go to this page and download the library: Download marshmallow/simple-value-metric library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
marshmallow / simple-value-metric example snippets
use Marshmallow\SimpleValueMetric\SimpleValueMetric;
protected function cards()
{
return [
(new SimpleValueMetric)
->title('Scored quotations')
->calculate(function ($metric) {
return $metric->formattedValue(72)
->footer('99% of the quotations are orders!');
})
->help('72 of a total of 73 quotations are now orders :)'),
];
}
use Marshmallow\SimpleValueMetric\SimpleValueMetric;
(new SimpleValueMetric)
->title('Open quotations')
->calculate(function ($metric) {
return $metric->formattedValue(12)
->footer('Quotations awaiting review')
->button('/nova/resources/quotations', 'View all');
});