orderByDesc orderBy

This commit is contained in:
Benjamin Takats
2023-01-19 13:58:52 +01:00
parent 0c0b51ede7
commit 14ce3385ee
9 changed files with 32 additions and 24 deletions

View File

@@ -33,7 +33,6 @@ class BookCaseTable extends DataTableComponent
{
$this->setPrimaryKey('id')
->setAdditionalSelects(['id', 'homepage'])
->setDefaultSort('orange_pills_count', 'desc')
->setThAttributes(function (Column $column) {
return [
'class' => 'px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider dark:bg-gray-800 dark:text-gray-400',
@@ -125,7 +124,9 @@ class BookCaseTable extends DataTableComponent
])
->withCount([
'orangePills',
]);
])
->orderByDesc('orange_pills_count')
->orderBy('book_cases.id');
}
public function viewHistoryModal($modelId): void