How to get DatePicker filter value inside an action?
I am trying to build an export action in panel, how can I get the currently applied filter's values inside the action function? I can see the applied filters as part of URL , is there anyway to fetch it from there inside a resource file?
2 Replies
Maybe this can help:
https://discord.com/channels/883083792112300104/1088674859778834462
@Albert Lens
Getting error : $this when not in object context
use pxlrbt\FilamentExcel\Exports\ExcelExport;
ExcelExport::make('Calls')->withColumns([Column::make('id')->heading("ID")])->modifyQueryUsing(fn ($query) => $query->where('created_at', '>=', $this->getTableFiltersForm()->getRawState()['created_from']))->withFilename(date('Y-m-d-His') . ' - export'),
@Albert Lens pls help