Hello Devs,

In this tutorial, we are going to learn how to add column in table using migration.



Migration Create Command

php artisan make:migration add_status_column_to_users_table --table=users


Add Column After

public function up()
{
    Schema::table('users', function (Blueprint $table) {
        $table->tinyInteger('status')->after('password');
    });
}


I hope this example helps you.