feat: implement dynamic login page configuration via database settings and update login view template

This commit is contained in:
Ümit Tunç
2026-04-28 22:46:55 +03:00
parent d1d3b4b01c
commit 2ab481ac76
3 changed files with 54 additions and 4 deletions
@@ -24,6 +24,10 @@ return new class extends Migration {
'DevExpress_Theme' => 'dx.material.orange.light.compact.css',
'pdf_template_path' => 'default',
'languages' => json_encode(['en', 'tr']),
'login_slogan' => 'Citrus: İş Süreçlerinizi Özgürleştiren ve Geleceği Şekillendiren Dijital Mimari.',
'login_welcome' => 'Hoş Geldiniz',
'login_description' => 'Yönetim panelinize erişmek için lütfen giriş yapın.',
'copyright_start_year' => '1991',
];
foreach ($settings as $key => $value) {
@@ -0,0 +1,46 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
use Illuminate\Support\Facades\DB;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
$settings = [
'login_slogan' => 'Citrus: İş Süreçlerinizi Özgürleştiren ve Geleceği Şekillendiren Dijital Mimari.',
'login_welcome' => 'Hoş Geldiniz',
'login_description' => 'Yönetim panelinize erişmek için lütfen giriş yapın.',
'copyright_start_year' => '1991',
];
foreach ($settings as $key => $value) {
DB::table('settings')->updateOrInsert(
['title' => $key],
[
'html' => $value,
'created_at' => now(),
'updated_at' => now(),
]
);
}
}
/**
* Reverse the migrations.
*/
public function down(): void
{
DB::table('settings')->whereIn('title', [
'login_slogan',
'login_welcome',
'login_description',
'copyright_start_year',
])->delete();
}
};