]> _ Git - cubist_cms-back.git/commitdiff
#2783
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 21 May 2019 16:25:45 +0000 (18:25 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 21 May 2019 16:25:45 +0000 (18:25 +0200)
src/app/Http/Controllers/CubistModelCrudController.php
src/app/Models/CubistModel.php
src/database/migrations/2019_05_20_161943_create_models_table.php

index f4d3417b87d490dc43539d484caffb96c23849d0..e711bb39371ac0d2b1f5be4686e286f9039d6367 100644 (file)
@@ -40,7 +40,7 @@ class CubistModelCrudController extends CrudController
             'label' => 'Model table name',
             'column' => true], 'create');
         $this->addField(['type' => 'text', 'name' => 'label', 'label' => 'Model label', 'column' => true], 'both');
-        $this->addField(['type' => 'textarea', 'name' => 'attributes', 'label' => 'Fields definitions'], 'both');
+        $this->addField(['type' => 'textarea', 'name' => 'fields', 'label' => 'Fields definitions'], 'both');
 
         // add asterisk for fields that are required in ModelRequest
         $this->crud->setRequiredFields(StoreRequest::class, 'create');
index 0a4ccb8143ea2204e0c94b99195675bc03dc56fa..46354be0c72c55cbda3fb8b548c20a774908eeb4 100644 (file)
@@ -21,7 +21,7 @@ class CubistModel extends Model
     // protected $primaryKey = 'id';
     // public $timestamps = false;
     // protected $guarded = ['id'];
-    protected $fillable = ['name', 'label', 'attributes'];
+    protected $fillable = ['name', 'label', 'fields'];
     // protected $hidden = [];
     // protected $dates = [];
 
index c1d7a434870a54768a398678662b10e8f80e0fc6..3ab4f2ca217954cc4628ac0167e200343f34d329 100644 (file)
@@ -16,7 +16,7 @@ class CreateModelsTable extends Migration
             $table->increments('id');
             $table->string('name')->unique();
             $table->string('label');
-            $table->json('attributes');
+            $table->longText('fields');
             $table->timestamps();
         });
     }