Nova-BI / nova-dashboard-manager

Dashboard Manager for Laravel Nova
MIT License
21 stars 8 forks source link

allow to access data from filter object #16

Closed cord closed 3 years ago

cord commented 3 years ago

adding id to filter object to retrieve data.

useful to e.g. display the given Filter Name as Label in Dashboard

in

vendor/nova-bi/nova-dashboard-manager/src/Models/Datafilterables/DateRange.php

add


    /**
     * Get the displayable name of the filter.
     *
     * @return string
     */
    public function name()
    {
        $item = $this->getFilterableItem();
        return $item->filterParent->name;
    }