FilamentF
Filament16mo ago
403gtfo

Help with persistent table order after saving

Hi team I have an edit page that redirect back to the table after using:
protected function getRedirectUrl(): string
{
  return $this->getResource()::getUrl('index');
}

The problem is:
If a user has changed the sorting, it resets and they have to resort again which can be a pain if they are doing a lot of updates.

I also have this on the $table though that doesn't seem to store the order.
return $table
  ->persistFiltersInSession()

Any advice would be greatly appreciated. I am sure it is something simple.
Solution
Sigh.... ignore me. The second I posed this I found the answer.
 return $this->previousUrl ?? $this->getResource()::getUrl('index');
Was this page helpful?