id(); $table->timestamps(); $table->foreignId('category_id') ->constrained('categories') ->onUpdate('cascade') ->onDelete('restrict'); $table->unsignedBigInteger('categorizable_id'); $table->string('categorizable_type'); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('categorizable'); } };