1Schema::table('users', function (Blueprint $table) {
2 $table->renameColumn('from', 'to');
3});
1Schema::table('users', function ($table) {
2 $table->string('name', 50)->change();
3});
4We could also modify a column to be nullable:
5
6Schema::table('users', function ($table) {
7 $table->string('name', 50)->nullable()->change();
8});
1public function up()
2{
3 Schema::table('sometable', function (Blueprint $table) {
4 $table->text('text')->change();
5 });
6}
1php artisan make:migration add_votes_to_users_table --table=users
2
3php artisan make:migration create_users_table --create=users
1Schema::table('users', function ($table) {
2 $table->string('email')->after('id')->nullable();
3});