id(); $table->foreignId('user_id')->constrained()->cascadeOnDelete(); $table->string('type', 100); $table->json('data')->nullable(); $table->timestamp('read_at')->nullable(); $table->timestamps(); // Indexes $table->index('user_id'); $table->index('type'); $table->index('read_at'); $table->index('created_at'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('notifications'); } };