<?php
namespace App\Nova\Metrics;
use App\Models\Hello;
use Illuminate\Support\Facades\DB;
use Illuminate\Http\Request;
use Laravel\Nova\Metrics\Value;
class HelloMetrics extends Value
{
/**
* Calculate the value of the metric.
*
* @param \Illuminate\Http\Request $request
* @return mixed
*/
public function calculate(Request $request)
{
return $this->sum($request, Hello::class, 'bye')
->format('0,0');
}
Still doesn't work.
The total of sum = 12143, but the metrics show 12.14k.