Browse Source

Fixed dynamic column headers

ttreasure 7 months ago
parent
commit
5baa5932b6

+ 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