id(); $table->foreignId('user_id')->constrained()->onDelete('cascade'); $table->string('type'); $table->text('message'); $table->boolean('is_read')->default(false); $table->timestamp('created_at'); // Indexes $table->index('user_id'); $table->index('is_read'); $table->index(['user_id', 'is_read']); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('notifications'); } };