increments('id'); $table->integer('user_id')->index(); $table->integer('favouritable_id'); $table->string('favouritable_type', 100); $table->timestamps(); $table->index(['favouritable_id', 'favouritable_type'], 'favouritable_index'); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('favourites'); } }