I created a migration with name
column making nullable
. How can I change name
as not nullable
? My previous migration code is given below:
Schema::table('users', function($table)
{
$table->string('name', 50)->nullable();
});
Use this:
Schema::table('users', function (Blueprint $table) {
$table->string('name', 50)->nullable(false)->change();
});