DEV Community

Nagarajan R
Nagarajan R

Posted on

Answer: Laravel 5.2 migration comment on column in migration

You can use comment() method along with change()

Schema::table('users', function(Blueprint $table) {
    $table->string('name')->comment('Name of the user')->change();
});

To make sure it migrated properly

mysql> show full columns from users like 'name';
+-------+--------------+--------------------+------+-----+---------+-------+---------------------------------+------------------+
| Field | Type         | Collation          | Null | Key | Default | Extra | Privileges                      | Comment

Top comments (0)