id(); $table->foreignIdFor(Chat::class)->constrained()->cascadeOnUpdate()->cascadeOnDelete(); $table->longText('text')->nullable(); $table->string('from')->default('user'); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('messages'); } };