fix bug 3

This commit is contained in:
2026-07-12 18:35:53 +03:30
parent b29cb4e37a
commit 555f09b9c7
4 changed files with 59 additions and 4 deletions
@@ -0,0 +1,29 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Support\Facades\DB;
return new class extends Migration
{
public function up(): void
{
if (! DB::table('settings')->where('key', 'tracking_systems_enabled')->exists()) {
DB::table('settings')->insert([
'key' => 'tracking_systems_enabled',
'value' => 'false',
'title_fa' => 'نمایش سامانه‌های ردیابی',
'type' => 'switch',
'can_edit' => 0,
'is_active' => 1,
'description' => 'روشن: اسکریپت‌های tracking_systems در اپ مشتری بارگذاری می‌شوند؛ خاموش: هیچ ردیابی فعال نیست',
'created_at' => now(),
'updated_at' => now(),
]);
}
}
public function down(): void
{
DB::table('settings')->where('key', 'tracking_systems_enabled')->delete();
}
};