Преглед на файлове

Fixed dynamic column headers

ttreasure преди 9 месеца
родител
ревизия
5baa5932b6
променени са 2 файла, в които са добавени 3 реда и са изтрити 0 реда
  1. 3 0
      database/migrations/2025_04_12_024027_add_column_headers_column_to_datatables_table.php
  2. 0 0
      storage/framework/.gitignore

+ 3 - 0
database/migrations/2025_04_12_024027_add_column_headers_column_to_datatables_table.php

@@ -3,6 +3,8 @@
 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
 {
@@ -14,6 +16,7 @@ return new class extends Migration
         Schema::table('datatables', function (Blueprint $table) {
             $table->json('column_headers');
         });
+        DB::table('datatables')->where('id', 1)->update(['column_headers' => '[{"header":"Employee Name","type":"string","searchable":true,"searchtype":"text"},{"header":"Employee Email","type":"string","searchable":true,"searchtype":"text"},{"header":"Employee Position","type":"string","searchable":true,"searchtype":"text"},{"header":"Office Name","type":"string","searchable":true,"searchtype":"text"},{"header":"Office Locaion","type":"string","searchable":true,"searchtype":"text"}]']);
     }
 
     /**

+ 0 - 0
storage/framework/.gitignore