increments('id'); $table->timestamps(); $table->softDeletes(); $table->string('name', 50); $table->integer('user_id')->unsigned(); $table->string('class', 20); // connect components to users $table->foreign('user_id')->references('id')->on('users')->onDelete('cascade'); // for a user, the component type & name must be unique. $table->unique(['user_id', 'class', 'name']); } ); } }