Get all sortable columns of table

Hi, I'm trying to create some automated tests. So basically I want to execute all these tests (https://filamentphp.com/docs/3.x/tables/testing), but I'm trying to automate them.

Now I'm wondering how I could get all the columns of my table which I specified with ->sortable() in my resource.

Than I can just create a loop and execute my tests based on the fields.
Solution
return collect($this->getResourceTableColumns())
    ->filter(fn ($column) => $column->isSortable());
Was this page helpful?