"cubist/util": "dev-master",
"fideloper/proxy": "^4.0",
"laravel/tinker": "^1.0",
- "predis/predis": "^1.1"
+ "predis/predis": "^1.1",
+ "webfactor/laravel-backpack-instant-fields": "^2.1.2"
},
"require-dev": {
"backpack/generators": "^1.2"
--- /dev/null
+<?php
+
+namespace Cubist\Backpack\app\Models;
+
+use Backpack\CRUD\CrudTrait;
+use Illuminate\Database\Eloquent\Model;
+
+class Field extends Model
+{
+ use CrudTrait;
+
+ protected $table = 'cubist_fields';
+ protected $fillable = ['name', 'type','options'];
+}
--- /dev/null
+<?php
+
+use Illuminate\Database\Migrations\Migration;
+use Illuminate\Database\Schema\Blueprint;
+
+class CreateFieldsTable extends Migration
+{
+ /**
+ * Run the migrations.
+ *
+ * @return void
+ */
+ public function up()
+ {
+ Schema::create('cubist_fields', function (Blueprint $table) {
+ $table->increments('id');
+ $table->string('name');
+ $table->string('type');
+ $table->json('options');
+ $table->timestamps();
+ });
+
+ }
+
+ /**
+ * Reverse the migrations.
+ *
+ * @return void
+ */
+ public function down()
+ {
+ Schema::drop('cubist_fields');
+ }
+}