最佳答案
我正在向迁移中的表中添加一个字段,我希望允许它为 NULL,但也希望它默认为 NULL。我应该在默认方法中放置什么?我担心放入 "NULL"
会试图放入一串我显然不想要的 NULL
。请帮助:)
Schema::table('item_categories', function(Blueprint $table)
{
$table->integer('parent_item_category_id')->unsigned()->nullable()->default($what_to_put here);
});