increments("id"); $table->integer("post_id")->unsigned(); $table->foreign("post_id")->references("id")->on("posts")->onDelete("cascade")->onUpdate("cascade"); $table->ipAddress("ip_address"); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('likes'); } }