PHPackages                             marshmallow/nova-totals-footer - 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/nova-totals-footer

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

marshmallow/nova-totals-footer
==============================

This Laravel Nova package is used for calculating the total of the columns that you wish to show.

1.2.1(3w ago)24961MITPHPPHP ^8.1CI passing

Since Jan 30Pushed 3w ago2 watchersCompare

[ Source](https://github.com/marshmallow-packages/nova-totals-footer)[ Packagist](https://packagist.org/packages/marshmallow/nova-totals-footer)[ RSS](/packages/marshmallow-nova-totals-footer/feed)WikiDiscussions main Synced today

READMEChangelog (4)Dependencies (11)Versions (7)Used By (0)

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

Laravel Nova Totals Footer
==========================

[](#laravel-nova-totals-footer)

[![Latest Version on Packagist](https://camo.githubusercontent.com/f01470774dab39735c6e97f716cc21f39074bbafd9901b3995da92b2763c935a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d617273686d616c6c6f772f6e6f76612d746f74616c732d666f6f7465722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/marshmallow/nova-totals-footer)[![Tests](https://camo.githubusercontent.com/29323bb49dd127ec2151597d0d6d4fed191689c4ad579d05c06d3de27829d2b0/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6d617273686d616c6c6f772d7061636b616765732f6e6f76612d746f74616c732d666f6f7465722f74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/marshmallow-packages/nova-totals-footer/actions/workflows/tests.yml)[![Total Downloads](https://camo.githubusercontent.com/a77ff07570a9804c3684e3d7d23665740905c8094b0ec3ca00f0cdf5e8200915/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d617273686d616c6c6f772f6e6f76612d746f74616c732d666f6f7465722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/marshmallow/nova-totals-footer)

This [Laravel Nova](https://nova.laravel.com) package adds a totals footer to your resource index tables, calculating the total of any columns you choose.

Screenshot
----------

[](#screenshot)

[![](./resources/screenshot/totals-footer-screenshot.png)](./resources/screenshot/totals-footer-screenshot.png)

Requirements
------------

[](#requirements)

- `php: ^8.1`
- `laravel/nova: ^5.0`

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

[](#installation)

Install the package via Composer:

```
composer require marshmallow/nova-totals-footer
```

The package is a Nova tool and is auto-discovered — no further registration is needed.

Usage
-----

[](#usage)

To include a field in the table footer, call its `calculate()` method and describe the calculation. The available methods are `sum`, `count`, `avg`, `min` and `max`:

```
use Laravel\Nova\Fields\Currency;

Currency::make('Revenue', 'revenue')
    ->required()

    /** 👇 This is where the magic happens */
    ->calculate(
        method: 'sum',     // sum, count, avg, min, max
        title: 'Total',
        prefix: '$',
        postfix: '.00',
        hideTitle: true,   // true, false (default)
        align: 'right',    // left, right (default), center
        titleAlign: 'right', // left, right (default), center
        decimals: 2,       // number of decimals to format the total with (default: 0)
    ),
```

> When the resource is shown through a relationship (e.g. a `HasMany` field on another resource), the footer totals are calculated over the **related**records only, matching the rows in the table.

### Hide the footer header

[](#hide-the-footer-header)

Sometimes you don't want the extra title row above the totals. You can hide it:

```
use Marshmallow\NovaTotalsFooter\NovaTotalsFooter;

NovaTotalsFooter::hideHeader();
```

### Static analysis (PHPStan / Larastan)

[](#static-analysis-phpstan--larastan)

`calculate()` is a runtime macro on Nova's `Field`, so static analysers don't know about it by default. Register the shipped stub in your `phpstan.neon` so it's recognised (no more `@phpstan-ignore` on every call):

```
parameters:
    stubFiles:
        - vendor/marshmallow/nova-totals-footer/stubs/calculate-macro.stub
```

Testing
-------

[](#testing)

The package ships a [Pest](https://pestphp.com) + [Orchestra Testbench](https://github.com/orchestral/testbench) suite. Nova is a private dependency, so configure your credentials before installing:

```
composer config http-basic.nova.laravel.com "your-email" "your-license-key"
composer install
composer test
```

CI (`.github/workflows/tests.yml`) runs the suite against PHP 8.2–8.4 and expects `NOVA_USERNAME` and `NOVA_PASSWORD` repository secrets.

Contributing
------------

[](#contributing)

Feel free to suggest changes, ask for new features or fix bugs yourself. We're sure there are still a lot of improvements that could be made, and we would be very happy to merge useful pull requests.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please report security vulnerabilities by email to  rather than via the public issue tracker.

Credits
-------

[](#credits)

- [All Contributors](https://github.com/marshmallow-packages/nova-totals-footer/contributors)

License
-------

[](#license)

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

💖 Sponsorships
--------------

[](#-sponsorships)

If you are reliant on this package in your production applications, consider [sponsoring us](https://github.com/sponsors/marshmallow-packages)! It is the best way to help us keep doing what we love to do: making great open source software.

Made with ❤️ for open source
----------------------------

[](#made-with-️-for-open-source)

At [Marshmallow](https://marshmallow.nl) we use a lot of open source software as part of our daily work. So when we have an opportunity to give something back, we're super excited!

We hope you will enjoy this small contribution from us and would love to [hear from you](mailto:hello@marshmallow.nl) if you find it useful in your projects. Follow us on [Twitter](https://x.com/marshmallow_dev) for more updates!

###  Health Score

47

—

FairBetter than 93% of packages

Maintenance95

Actively maintained with recent releases

Popularity20

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 95.7% 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 ~165 days

Total

4

Last Release

22d ago

### 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 (22 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")

---

Tags

laravelnovamarshmallowtotals

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/marshmallow-nova-totals-footer/health.svg)

```
[![Health](https://phpackages.com/badges/marshmallow-nova-totals-footer/health.svg)](https://phpackages.com/packages/marshmallow-nova-totals-footer)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M345](/packages/psalm-plugin-laravel)[renatomarinho/laravel-page-speed

Laravel Page Speed

2.5k1.7M11](/packages/renatomarinho-laravel-page-speed)[vinkius-labs/laravel-page-speed

Laravel Page Speed

2.5k12.5k1](/packages/vinkius-labs-laravel-page-speed)[emargareten/inertia-modal

Inertia Modal is a Laravel package that lets you implement backend-driven modal dialogs for Inertia apps.

90142.9k](/packages/emargareten-inertia-modal)[wearepixel/laravel-cart

A cart implementation for Laravel

1374.8k](/packages/wearepixel-laravel-cart)[tomshaw/electricgrid

A feature-rich Livewire package designed for projects that require dynamic, interactive data tables.

119.4k](/packages/tomshaw-electricgrid)

PHPackages © 2026

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