定制 marshmallow/nova-totals-footer 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

marshmallow/nova-totals-footer

最新稳定版本:1.1.0

Composer 安装命令:

composer require marshmallow/nova-totals-footer

包简介

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

README 文档

README

Version Issues Licence

Laravel Nova Totals footer

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

Screenshot

Requirements

  • php: ^8.1
  • laravel/nova: ^5.0

Installation

Install via composer:

composer require marshmallow/nova-totals-footer

Usage

To include specific fields in the table footer, invoke their respective calculate methods. Within this method, specify the calculation logic to determine the desired value. By default, the available calculation methods include sum, count, avg, min and max. Refer to the example below for further clarification.

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

    /** 👇 This is where the magic happens */
    ->calculate(
        method: 'sum', // sum, count, avg, min and max
        title: 'Total',
        prefix: '$',
        postfix: '.00',
        hideTitle: true, // true, false (default)
        align: 'right', // left, right (default), center
        titleAlign: 'right', // left, right (default), center
    ),

Hide the header off footer

This sound weird, but sometimes we needed to hide the header of the footer. We didn't need this extra footer row. Is you need to hide this, you can call the method below.

use Marshmallow\NovaTotalsFooter\NovaTotalsFooter;

NovaTotalsFooter::hideHeader();

Licence

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

💖 Sponsorships

If you are reliant on this package in your production applications, consider sponsoring us! It is the best way to help us keep doing what we love to do: making great open source software.

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.

Special thanks to

Made with ❤️ for open source

At Marshmallow 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 if you find it useful in your projects. Follow us on Twitter for more updates!

统计信息

  • 总下载量: 404
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 2
  • Forks: 0
  • 开发语言: Vue

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-01-30