How to add a column to a database table with laravel migrations:

Example. Add a 'subscription' column to the products table

1. Create a table if its already not created: example table: products
$ php artisan make:migration create_products_table --create=products

2. Migrate the newly create file xxx_create_products_table.php into the database
$ php artisan migrate

3. Add an 'subscription' column to the products table:
$ php artisan make:migration add_subscription_to_products_table

4. Open the edit created file xxx_add_subscription_to_products_table, Add the following into the Schema:
$ code database/migrations/*_add_subscription_to_products_table.php

5. Migrate the new column into the database
$ php artisan migrate

return new class extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::table('products', function (Blueprint $table) {
            $table->integer('subscription');
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::table('products', function (Blueprint $table) {
            $table->dropColumn('subscription');
        });
    }
};