From: Daniel Karbach Date: Thu, 24 Aug 2023 20:16:51 +0000 (+0200) Subject: add tech gif X-Git-Url: https://git.localhorst.tv/?a=commitdiff_plain;h=aa5f285a5fd3c1047c428b3e9f843b900b966f98;p=alttp.git add tech gif --- diff --git a/app/DiscordAppCommands/AlttpTechCommand.php b/app/DiscordAppCommands/AlttpTechCommand.php index d97cfee..ac341ba 100644 --- a/app/DiscordAppCommands/AlttpTechCommand.php +++ b/app/DiscordAppCommands/AlttpTechCommand.php @@ -47,7 +47,11 @@ class AlttpTechCommand { 'type' => 'rich', 'url' => url('/tech/'.rawurlencode($tech->name)), ]; - if ($tech->image) { + if ($tech->gif) { + $properties['image'] = [ + 'url' => url($tech->gif), + ]; + } else if ($tech->image) { $properties['image'] = [ 'url' => url($tech->image), ]; diff --git a/database/migrations/2023_08_24_201527_add_tech_gif.php b/database/migrations/2023_08_24_201527_add_tech_gif.php new file mode 100644 index 0000000..a988ae4 --- /dev/null +++ b/database/migrations/2023_08_24_201527_add_tech_gif.php @@ -0,0 +1,32 @@ +string('gif')->nullable()->default(null); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('techniques', function(Blueprint $table) { + $table->dropColumn('gif'); + }); + } +};