Skip to content

Commit be06494

Browse files
committed
Add support for a favicon
1 parent dad0f30 commit be06494

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

database/seeders/SettingsSeeder.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,11 @@ public function run(): void
4242
'validation' => 'sometimes|nullable|string|url:http,https',
4343
'description' => 'URL for the large image shown during login and signup',
4444
],
45+
'favicon' => (object)[
46+
'name' => 'Favicon',
47+
'validation' => 'sometimes|nullable|string|url:http,https',
48+
'description' => 'URL for a favicon to use',
49+
],
4550
'discord.server.name' => (object)[
4651
'name' => 'Discord Server Name',
4752
'hidden' => true,

resources/views/layouts/app.blade.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212
<title>
1313
@setting('name')
1414
</title>
15+
@if(App\Models\Setting::fetch('favicon'))
16+
<link rel="shortcut icon" href="@setting('favicon')"/>
17+
@endif
1518
@stack('head')
1619
@include('partials._theme')
1720
</head>

resources/views/layouts/login.blade.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover"/>
66
<meta http-equiv="X-UA-Compatible" content="ie=edge"/>
77
<title>@setting('name', config('app.name'))</title>
8+
@if(App\Models\Setting::fetch('favicon'))
9+
<link rel="shortcut icon" href="@setting('favicon')"/>
10+
@endif
811
@vite(['resources/css/app.css', 'resources/js/app.js'])
912
<meta name="csrf-token" content="{{ csrf_token() }}">
1013
@include('partials._theme')

0 commit comments

Comments
 (0)