@@ -20,6 +20,7 @@ class CustomFieldResource extends JsonResource
'group' => $this->group,
'label' => $this->label,
'options' => $this->options,
+ 'inputs' => $this->inputs,
'type' => $this->type,
'required' => $this->required,
'remark' => $this->remark,
@@ -13,7 +13,7 @@ class CustomField extends Model
public $timestamps = false;
protected $fillable = [
- 'group', 'key', 'options', 'type', 'required', 'label','remark'
+ 'group', 'key', 'options', 'type', 'required', 'label','remark','inputs'
];
protected $casts = [
@@ -0,0 +1,30 @@
+<?php
+
+use Illuminate\Database\Migrations\Migration;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
+return new class extends Migration
+{
+ /**
+ * Run the migrations.
+ */
+ public function up(): void
+ {
+ Schema::table('custom_fields', function (Blueprint $table) {
+ //
+ $table->json('inputs')->nullable();
+ });
+ }
+ * Reverse the migrations.
+ public function down(): void
+ $table->dropColumn('inputs');
+};