create( 'variants', function ($table) { $table->increments('id'); $table->unsignedInteger('article_id'); $table->foreign('article_id')->references('id')->on('articles'); $table->string('name'); $table->string('short'); $table->float('price', 8, 2); $table->timestamps(); } ); } /** * Reverse the migrations. * * @return void */ public function down() { $builder = Capsule::schema(); $builder->drop('variants'); } }