id(); $table->foreignId('user_id')->constrained()->cascadeOnDelete(); $table->string('type'); $table->string('title'); $table->text('body'); $table->json('data')->nullable(); $table->timestamp('read_at')->nullable(); $table->timestamps(); $table->index(['user_id', 'created_at']); $table->index(['user_id', 'read_at']); }); } public function down(): void { Schema::dropIfExists('notifications'); } };