Skip to content
This repository was archived by the owner on Apr 13, 2021. It is now read-only.
This repository was archived by the owner on Apr 13, 2021. It is now read-only.

Cannot declare the 'FilterableValue' to my card #4

@oliverbj

Description

@oliverbj

Hi there

  • Laravel 5.7

I am a bit confused on how to use this package. I have followed the readme:

This is my Metric Card:
NewFlowStatistics.php

use Beyondcode\FilterableCard\FilterableValue;

class NewFlowStatistics extends Value
{
    use FilterableValue;

      protected $filters = [
        'flow_name' => [
            'type' => 'text'
        ],
    ];

And then in the same file, this is my calculate() function:

    public function calculate(Request $request)
    {
        return $this->value($request, FlowStatistics::class);
    }

However this gives me below error:

Declaration of Beyondcode\FilterableCard\FilterableValue::aggregate($request, $model, $function, $column = NULL) should be compatible with Laravel\Nova\Metrics\Value::aggregate($request, $model, $function, $column = NULL, $dateColumn = NULL)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions