increments('id'); $table->text('comment'); $table->unsignedInteger('commentable_id'); $table->string('commentable_type'); $table->unsignedInteger('user_id'); $table->tinyInteger('status')->default(0); $table->foreign('user_id')->references('id')->on('users')->onDelete('cascade'); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('comments'); } }