marking chapters as complete and toggling value from course list and chapter page.

This commit is contained in:
Krzysztof Płaczek
2023-06-13 16:39:20 +02:00
parent 018597faaa
commit 301244cdb0
7 changed files with 45 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
public function up(): void
{
Schema::table('chapters', function (Blueprint $table) {
$table->boolean('is_complete')->default(0);
});
}
public function down(): void
{
Schema::table('chapters', function (Blueprint $table) {
$table->removeColumn('is_complete');
});
}
};