Closed xoco70 closed 4 years ago
Firstable you have to let your custom card listen and react to global filter changes. I have mentioned briefly here
And than you can use GlobalFilterable
trait on your custom card and access filtered model like so
// Filter your model with existing filters
$model = $this->globalFiltered(YourModel::class,[
YourFilter::class
]);
// Do your thing with the filtered $model
return $this->countByDays($request, $model);
Hi,
Nice plugin, very useful.
I'm trying to use it on a custom card, based on Nova-charts
If I can send the filter into
calculate()
method for trends, how should I send it to a custom card.Here is my Card definition: