Skip to content

Commit

Permalink
Add more socials
Browse files Browse the repository at this point in the history
  • Loading branch information
Xinecraft committed Mar 14, 2024
1 parent d251d1d commit f5c6c15
Show file tree
Hide file tree
Showing 169 changed files with 1,581 additions and 1,288 deletions.
13 changes: 12 additions & 1 deletion app/Http/Controllers/Admin/Settings/GeneralSettingController.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,12 @@ public function update(Request $request, GeneralSettings $settings): \Illuminate
'twitch_url' => 'nullable|url|max:255',
'tiktok_url' => 'nullable|url|max:255',
'linkedin_url' => 'nullable|url|max:255',
'instagram_url' => 'nullable|url|max:255',
'whatsapp_url' => 'nullable|url|max:255',
'telegram_url' => 'nullable|url|max:255',
'reddit_url' => 'nullable|url|max:255',
'threads_url' => 'nullable|url|max:255',
'github_url' => 'nullable|url|max:255',
'discord_invite_url' => 'nullable|url|max:255',
'enable_discordbox' => 'required|boolean',
'discord_server_id' => 'required_if:enable_discordbox,true|nullable|string|max:255',
Expand Down Expand Up @@ -81,8 +86,14 @@ public function update(Request $request, GeneralSettings $settings): \Illuminate
$settings->twitch_url = $request->input('twitch_url');
$settings->tiktok_url = $request->input('tiktok_url');
$settings->linkedin_url = $request->input('linkedin_url');
$settings->instagram_url = $request->input('instagram_url');
$settings->whatsapp_url = $request->input('whatsapp_url');
$settings->telegram_url = $request->input('telegram_url');
$settings->reddit_url = $request->input('reddit_url');
$settings->threads_url = $request->input('threads_url');
$settings->github_url = $request->input('github_url');

$settings->discord_invite_url = $request->input('discord_invite_url');
// $settings->threads_url = $request->input('threads_url');

$settings->enable_discordbox = $request->input('enable_discordbox');
$settings->discord_server_id = $request->input('discord_server_id');
Expand Down
5 changes: 5 additions & 0 deletions app/Settings/GeneralSettings.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ class GeneralSettings extends Settings
public ?string $tiktok_url;
public ?string $linkedin_url;
public ?string $threads_url;
public ?string $instagram_url;
public ?string $whatsapp_url;
public ?string $telegram_url;
public ?string $reddit_url;
public ?string $github_url;
public ?string $discord_invite_url;

public bool $enable_discordbox;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?php

use Spatie\LaravelSettings\Migrations\SettingsMigration;

return new class extends SettingsMigration
{
public function up(): void
{
$this->migrator->add('general.instagram_url', null);
$this->migrator->add('general.whatsapp_url', null);
$this->migrator->add('general.telegram_url', null);
$this->migrator->add('general.reddit_url', null);
$this->migrator->add('general.github_url', null);
}

public function down(): void
{
$this->migrator->deleteIfExists('general.instagram_url');
$this->migrator->deleteIfExists('general.whatsapp_url');
$this->migrator->deleteIfExists('general.telegram_url');
$this->migrator->deleteIfExists('general.reddit_url');
$this->migrator->deleteIfExists('general.github_url');
}
};

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit f5c6c15

Please sign in to comment.