Implement snip sorting

This commit is contained in:
Tim
2025-05-04 16:58:11 +02:00
parent 59e068fbf7
commit f52058c250
3 changed files with 20 additions and 1 deletions

View File

@ -4,8 +4,12 @@ namespace App\Dto;
readonly class SnipFilterRequest implements CachableDtoInterface
{
public const string SORT_NAME = 'name';
public const string SORT_DATE = 'date';
public function __construct(
public bool $onlyVisible = true,
public ?string $sort = self::SORT_DATE,
) {}
public function toArray(): array