mirror of
https://github.com/filamentphp/filament.git
synced 2026-10-24 01:58:00 +08:00
Merge pull request #15785 from NankoPrinzhorn/filament-session-key-improvement
Filament session key improvement
This commit is contained in:
@@ -78,7 +78,7 @@ trait HasFilters
|
||||
|
||||
public function getFiltersSessionKey(): string
|
||||
{
|
||||
$livewire = class_basename($this::class);
|
||||
$livewire = hash('md5', $this::class);
|
||||
|
||||
return "{$livewire}_filters";
|
||||
}
|
||||
|
||||
@@ -87,7 +87,7 @@ trait CanPaginateRecords
|
||||
|
||||
public function getTablePerPageSessionKey(): string
|
||||
{
|
||||
$table = class_basename($this::class);
|
||||
$table = hash('md5', $this::class);
|
||||
|
||||
return "tables.{$table}_per_page";
|
||||
}
|
||||
|
||||
@@ -273,14 +273,14 @@ trait CanSearchRecords
|
||||
|
||||
public function getTableSearchSessionKey(): string
|
||||
{
|
||||
$table = class_basename($this::class);
|
||||
$table = hash('md5', $this::class);
|
||||
|
||||
return "tables.{$table}_search";
|
||||
}
|
||||
|
||||
public function getTableColumnSearchesSessionKey(): string
|
||||
{
|
||||
$table = class_basename($this::class);
|
||||
$table = hash('md5', $this::class);
|
||||
|
||||
return "tables.{$table}_column_search";
|
||||
}
|
||||
|
||||
@@ -142,7 +142,7 @@ trait CanSortRecords
|
||||
|
||||
public function getTableSortSessionKey(): string
|
||||
{
|
||||
$table = class_basename($this::class);
|
||||
$table = hash('md5', $this::class);
|
||||
|
||||
return "tables.{$table}_sort";
|
||||
}
|
||||
|
||||
@@ -80,7 +80,7 @@ trait CanToggleColumns
|
||||
|
||||
public function getTableColumnToggleFormStateSessionKey(): string
|
||||
{
|
||||
$table = class_basename($this::class);
|
||||
$table = hash('md5', $this::class);
|
||||
|
||||
return "tables.{$table}_toggled_columns";
|
||||
}
|
||||
|
||||
@@ -178,7 +178,7 @@ trait HasFilters
|
||||
|
||||
public function getTableFiltersSessionKey(): string
|
||||
{
|
||||
$table = class_basename($this::class);
|
||||
$table = hash('md5', $this::class);
|
||||
|
||||
return "tables.{$table}_filters";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user