29 lines
755 B
PHP
29 lines
755 B
PHP
<?php
|
|
|
|
use App\Models\Course;
|
|
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::create('chapters', function (Blueprint $table) {
|
|
$table->id();
|
|
$table->foreignIdFor(Course::class);
|
|
$table->integer('order');
|
|
$table->text('title');
|
|
$table->text('duration')->nullable();
|
|
$table->text('link');
|
|
$table->text('video_link');
|
|
$table->integer('video_size');
|
|
$table->timestamps();
|
|
});
|
|
}
|
|
|
|
public function down(): void
|
|
{
|
|
Schema::dropIfExists('chapters');
|
|
}
|
|
};
|