Initial commit

This commit is contained in:
Richard Jolley committed 2026-01-14 00:54:08 +00:00
commit c909d539bc
7178 files changed
+756624

No files matched your search

+27
View File
@@ -0,0 +1,27 @@
<?php
namespace Database\Seeders;
use Illuminate\Database\Seeder;
use App\Models\LessonSection;
use App\Models\Module;
class LessonSectionSeeder extends Seeder
{
public function run(): void
{
$pure = Module::where('name', 'Pure Mathematics')->first();
$sections = [
['module_id' => $pure->id, 'title' => 'Year 1', 'order' => 1],
['module_id' => $pure->id, 'title' => 'Year 2', 'order' => 2],
];
foreach ($sections as $section) {
LessonSection::updateOrCreate(
['module_id' => $section['module_id'], 'title' => $section['title']],
$section
);
}
}
}