code/database/migrations/2022_03_27_215240_sorted_products.php
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class SortedProducts extends Migration
{
public function up()
{
Schema::table('products', function (Blueprint $table) {
$table->integer('sorting')->default(0);
});
}
public function down()
{
Schema::table('products', function (Blueprint $table) {
$table->dropColumn('sorting');
});
}
}