id(); $table->foreignId('user_id')->constrained()->onDelete('cascade'); $table->morphs('voteable'); $table->tinyInteger('vote'); $table->timestamps(); $table->unique(['user_id', 'voteable_id', 'voteable_type']); }); } public function down(): void { Schema::dropIfExists('votes'); } };