From 4cd6924e22e00d0c757fd6e9bfb5611d3bd52063 Mon Sep 17 00:00:00 2001 From: Benjamin Takats Date: Sat, 14 Jan 2023 22:19:48 +0100 Subject: [PATCH] sort by pills --- app/Http/Livewire/Tables/BookCaseTable.php | 1 + config/gamify.php | 25 +++++++++++----------- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/app/Http/Livewire/Tables/BookCaseTable.php b/app/Http/Livewire/Tables/BookCaseTable.php index c4877db1..1b2f9b2d 100644 --- a/app/Http/Livewire/Tables/BookCaseTable.php +++ b/app/Http/Livewire/Tables/BookCaseTable.php @@ -29,6 +29,7 @@ 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', diff --git a/config/gamify.php b/config/gamify.php index b40050ac..dd626323 100644 --- a/config/gamify.php +++ b/config/gamify.php @@ -2,36 +2,37 @@ return [ // Model which will be having points, generally it will be User - 'payee_model' => '\App\User', + 'payee_model' => '\App\User', // Reputation model - 'reputation_model' => '\QCod\Gamify\Reputation', + 'reputation_model' => '\QCod\Gamify\Reputation', // Allow duplicate reputation points - 'allow_reputation_duplicate' => true, + 'allow_reputation_duplicate' => true, // Broadcast on private channel 'broadcast_on_private_channel' => true, // Channel name prefix, user id will be suffixed - 'channel_name' => 'user.reputation.', + 'channel_name' => 'user.reputation.', // Badge model - 'badge_model' => '\QCod\Gamify\Badge', + 'badge_model' => '\QCod\Gamify\Badge', // Where all badges icon stored - 'badge_icon_folder' => 'images/badges/', + 'badge_icon_folder' => 'images/badges/', // Extention of badge icons - 'badge_icon_extension' => '.svg', + 'badge_icon_extension' => '.svg', // All the levels for badge - 'badge_levels' => [ - 'beginner' => 1, - 'intermediate' => 2, - 'advanced' => 3, + 'badge_levels' => [ + 'No-Coiner' => 0, + 'Orange Pilled' => 1, + 'Cyber Hornet' => 21000, // 210.000 + 'Satoshi Nakamoto' => 21000000, // 21.000.000 ], // Default level - 'badge_default_level' => 1 + 'badge_default_level' => 0 ];