Laravel - Migrations - Updating Column Attributes

The change method allows you to modify the type and attributes of existing columns. For example, you may wish to increase the size of a string column. To see the change method in action, let's increase the size of the name column from 25 to 50. To accomplish this, we simply define the new state of the column and then call the change method:

    
    Schema::table('users', function (Blueprint $table) {
        $table->string('name', 50)->change();
    });
	

We could also modify a column to be nullable:

    
    Schema::table('users', function (Blueprint $table) {
        $table->string('name', 50)->nullable()->change();
    });
	
The following column types can be modified: bigInteger, binary, boolean, date, dateTime, dateTimeTz, decimal, integer, json, longText, mediumText, smallInteger, string, text, time, unsignedBigInteger, unsignedInteger, unsignedSmallInteger, and uuid. To modify a timestamp column type a Doctrine type must be registered.