PHPackages                             marshmallow/simple-value-metric - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. marshmallow/simple-value-metric

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

marshmallow/simple-value-metric
===============================

A Laravel Nova card.

v2.1.0(2y ago)011.5k↓67%[1 PRs](https://github.com/marshmallow-packages/simple-value-metric/pulls)MITPHPPHP ^7.3|^8.0CI passing

Since Sep 23Pushed 2w ago1 watchersCompare

[ Source](https://github.com/marshmallow-packages/simple-value-metric)[ Packagist](https://packagist.org/packages/marshmallow/simple-value-metric)[ RSS](/packages/marshmallow-simple-value-metric/feed)WikiDiscussions main Synced 2d ago

READMEChangelog (5)DependenciesVersions (17)Used By (0)

[![alt text](https://camo.githubusercontent.com/f5450f299f5713ce2f04dd5a1ba7ce9960ed4568b3574e4c4ee3cddc75477253/68747470733a2f2f6d617273686d616c6c6f772e6465762f63646e2f6d656469612f6c6f676f2d7265642d3233377834362e706e67 "marshmallow.")](https://camo.githubusercontent.com/f5450f299f5713ce2f04dd5a1ba7ce9960ed4568b3574e4c4ee3cddc75477253/68747470733a2f2f6d617273686d616c6c6f772e6465762f63646e2f6d656469612f6c6f676f2d7265642d3233377834362e706e67)

Nova Simple Value Metric
========================

[](#nova-simple-value-metric)

[![Latest Version on Packagist](https://camo.githubusercontent.com/5c292007599890fda5f591532ff2073d00ea3ab730a88b33891baf0e0da1ed52/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d617273686d616c6c6f772f73696d706c652d76616c75652d6d65747269632e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/marshmallow/simple-value-metric)[![Total Downloads](https://camo.githubusercontent.com/6b1f028fe97c078e73b15d8f0c6b1e8848f894d34cffa89f010f0d48e2a8fa3c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d617273686d616c6c6f772f73696d706c652d76616c75652d6d65747269632e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/marshmallow/simple-value-metric)

A Laravel Nova card that renders a simple value metric with a title, footer, optional help text and an optional action button.

[![](https://raw.githubusercontent.com/marshmallow-packages/simple-value-metric/main/resources/screenshot/screenshot.png)](https://raw.githubusercontent.com/marshmallow-packages/simple-value-metric/main/resources/screenshot/screenshot.png)

Installation
------------

[](#installation)

Install the package via Composer:

```
composer require marshmallow/simple-value-metric
```

The card registers itself through Laravel package auto-discovery (`Marshmallow\SimpleValueMetric\CardServiceProvider`), so no further setup is required.

Usage
-----

[](#usage)

Add the card to the `cards()` method of any Nova resource or dashboard:

```
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 :)'),
    ];
}
```

The value is set inside the `calculate()` callback so it can be computed at render time. The callback receives the card instance, on which you call the fluent methods below.

### Available methods

[](#available-methods)

MethodDescription`title(string $title)`The label shown above the value.`calculate(callable $callback)`Callback (receiving the card) used to compute the metric when it renders.`formattedValue(mixed $value)`The value displayed on the card.`footer(string $footer)`Text shown below the value.`suffix(string $suffix)`A suffix appended to the value (e.g. a unit or percentage sign).`button(string $link, string $text, string $class = 'btn btn-default btn-primary', string $target = '_blank')`Render an action button on the card.`showButtonWhen(Closure $closure)`Show the button only when the closure returns `true`.`help(string $helpText)`Help text shown in a tooltip on the card.`helpWidth(int $width)`Width of the help tooltip in pixels (defaults to `250`).The card width can be set with Nova's standard `$width` property (`1/3`, `1/2`, or `full`); it defaults to `1/3`.

### Adding a button

[](#adding-a-button)

```
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');
    });
```

Security
--------

[](#security)

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

Credits
-------

[](#credits)

- [Marshmallow](https://github.com/marshmallow-packages)
- [All Contributors](https://github.com/marshmallow-packages/simple-value-metric/contributors)

License
-------

[](#license)

The MIT License (MIT). Please see the [License File](LICENSE.md) for more information.

###  Health Score

44

—

FairBetter than 90% of packages

Maintenance63

Regular maintenance activity

Popularity23

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 83% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~102 days

Recently: every ~124 days

Total

12

Last Release

984d ago

Major Versions

v1.1.0 → v2.0.02022-06-12

PHP version history (3 changes)v1.0.0PHP &gt;=7.1.0

v1.0.1PHP ^7.1|^8.0

v2.0.2PHP ^7.3|^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/be33d2624e24c516e73892b0929447cc762f3622c024ab8d0d2a59042e5d2c7f?d=identicon)[marshmallow](/maintainers/marshmallow)

---

Top Contributors

[![stefvanesch](https://avatars.githubusercontent.com/u/46725619?v=4)](https://github.com/stefvanesch "stefvanesch (44 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (9 commits)")

---

Tags

laravelnova

### Embed Badge

![Health badge](/badges/marshmallow-simple-value-metric/health.svg)

```
[![Health](https://phpackages.com/badges/marshmallow-simple-value-metric/health.svg)](https://phpackages.com/packages/marshmallow-simple-value-metric)
```

###  Alternatives

[optimistdigital/nova-multiselect-field

A multiple select field for Laravel Nova.

3453.7M8](/packages/optimistdigital-nova-multiselect-field)[inspheric/nova-defaultable

Default values for Nova fields when creating resources and running resource actions.

52178.7k1](/packages/inspheric-nova-defaultable)[murdercode/nova4-tinymce-editor

Boost your Laravel Nova with the TinyMCE editor.

17186.3k1](/packages/murdercode-nova4-tinymce-editor)[datomatic/nova-detached-actions

A Laravel Nova tool to allow for placing actions in the Nova toolbar detached from the checkbox selection mechanism.

11273.0k](/packages/datomatic-nova-detached-actions)[wemersonrv/input-mask

A Laravel Nova custom field text with masks on input

1198.4k](/packages/wemersonrv-input-mask)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
