From 7612c5d8529ac1fba942608ab814d599bbd2c244 Mon Sep 17 00:00:00 2001 From: Godfrey M Date: Mon, 13 Mar 2023 15:26:51 -0700 Subject: [PATCH] lowercases variables --- app/Http/Livewire/SlackSettingsForm.php | 12 ++++++------ ..._173527_adds_webhook_option_to_settings_table.php | 2 +- .../views/livewire/slack-settings-form.blade.php | 6 +++--- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/app/Http/Livewire/SlackSettingsForm.php b/app/Http/Livewire/SlackSettingsForm.php index dfbc3b17cf..6a1932cb0c 100644 --- a/app/Http/Livewire/SlackSettingsForm.php +++ b/app/Http/Livewire/SlackSettingsForm.php @@ -26,8 +26,8 @@ class SlackSettingsForm extends Component 'webhook_botname' => 'string|nullable', ]; static $webhook_text= [ - "Slack" => array( - "name" => "Slack", + "slack" => array( + "name" => "slack", "icon" => 'fab fa-slack', "placeholder" => "https://hooks.slack.com/services/XXXXXXXXXXXXXXXXXXXXX", "link" => 'https://api.slack.com/messaging/webhooks', @@ -38,8 +38,8 @@ class SlackSettingsForm extends Component // "placeholder" => "https://discord.com/api/webhooks/XXXXXXXXXXXXXXXXXXXXX", // "link" => 'https://support.discord.com/hc/en-us/articles/360045093012-Server-Integrations-Page', // ), - "General"=> array( - "name" => "General", + "general"=> array( + "name" => "general", "icon" => "fab fa-hashtag", "placeholder" => "", "link" => "", @@ -61,7 +61,7 @@ class SlackSettingsForm extends Component } public function updated($field){ - if($this->webhook_selected != 'General') { + if($this->webhook_selected != 'general') { $this->validateOnly($field, $this->rules); } } @@ -119,7 +119,7 @@ class SlackSettingsForm extends Component } public function submit() { - if($this->webhook_selected != 'General') { + if($this->webhook_selected != 'general') { $this->validate($this->rules); } diff --git a/database/migrations/2023_02_28_173527_adds_webhook_option_to_settings_table.php b/database/migrations/2023_02_28_173527_adds_webhook_option_to_settings_table.php index 9e7a27872f..c3409c9d6f 100644 --- a/database/migrations/2023_02_28_173527_adds_webhook_option_to_settings_table.php +++ b/database/migrations/2023_02_28_173527_adds_webhook_option_to_settings_table.php @@ -14,7 +14,7 @@ class AddsWebhookOptionToSettingsTable extends Migration public function up() { Schema::table('settings', function (Blueprint $table) { - $table->string('webhook_selected')->after('slack_botname')->default('Slack')->nullable(); + $table->string('webhook_selected')->after('slack_botname')->default('slack')->nullable(); $table->renameColumn('slack_botname', 'webhook_botname'); $table->renameColumn('slack_endpoint', 'webhook_endpoint'); $table->renameColumn('slack_channel', 'webhook_channel'); diff --git a/resources/views/livewire/slack-settings-form.blade.php b/resources/views/livewire/slack-settings-form.blade.php index cdfd03c8c6..8d9ae7183c 100644 --- a/resources/views/livewire/slack-settings-form.blade.php +++ b/resources/views/livewire/slack-settings-form.blade.php @@ -24,7 +24,7 @@
- @if($webhook_selected != 'General') + @if($webhook_selected != 'general')

{!! trans('admin/settings/general.webhook_integration_help',array('webhook_link' => $webhook_link, 'app' => $webhook_name)) !!}

@@ -64,9 +64,9 @@ aria-label="webhook_selected" class="form-control " > - + {{-- --}} - +