소스 검색

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