database/migrations/2022_11_02_133941_add_column_public.php
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AddColumnPublic extends Migration
{
public function up()
{
Schema::table('courses', function (Blueprint $table) {
$table->boolean('public')->default(false);
});
}
public function down()
{
Schema::table('courses', function (Blueprint $table) {
$table->dropColumn('public');
});
}
}