id(); $table->unsignedBigInteger('message_thread_id'); $table->unsignedBigInteger('user_id'); $table->text('message')->nullable(); $table->enum('type',[0,1])->comment("0=> Text, 1=>File")->default(0); $table->enum('status',[0,1])->comment("0=> Unread, 1=>Read")->default(0); $table->foreign('message_thread_id')->references('id')->on('message_threads'); $table->foreign('user_id')->references('id')->on('users'); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('messages'); } }