mirror of
https://github.com/nihonbuzz/nihonbuzz-academy.git
synced 2026-01-26 05:25:37 +07:00
feat: update seeder with real YouTube video URLs and update technical blueprint
This commit is contained in:
@@ -42,15 +42,20 @@ class TestDataSeeder extends Seeder
|
||||
);
|
||||
|
||||
$lessons1 = [
|
||||
['title' => 'Selamat Datang di N5', 'slug' => 'welcome-n5', 'type' => 'video'],
|
||||
['title' => 'Struktur Menulis Jepang', 'slug' => 'writing-structure', 'type' => 'text'],
|
||||
['title' => 'Kata Ganti Orang', 'slug' => 'pronouns', 'type' => 'video'],
|
||||
['title' => 'Selamat Datang di N5', 'slug' => 'welcome-n5', 'type' => 'video', 'video_url' => 'https://www.youtube.com/watch?v=e8mQAY6HQQc'],
|
||||
['title' => 'Struktur Menulis Jepang', 'slug' => 'writing-structure', 'type' => 'text', 'video_url' => null],
|
||||
['title' => 'Kata Ganti Orang', 'slug' => 'pronouns', 'type' => 'video', 'video_url' => 'https://www.youtube.com/watch?v=e8mQAY6HQQc'],
|
||||
];
|
||||
|
||||
foreach ($lessons1 as $index => $lessonData) {
|
||||
Lesson::updateOrCreate(
|
||||
['module_id' => $module1->id, 'slug' => $lessonData['slug']],
|
||||
['title' => $lessonData['title'], 'type' => $lessonData['type'], 'order_index' => $index + 1]
|
||||
[
|
||||
'title' => $lessonData['title'],
|
||||
'type' => $lessonData['type'],
|
||||
'video_url' => $lessonData['video_url'],
|
||||
'order_index' => $index + 1
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
@@ -73,14 +78,19 @@ class TestDataSeeder extends Seeder
|
||||
);
|
||||
|
||||
$lessons2 = [
|
||||
['title' => 'Baris A-I-U-E-O', 'slug' => 'vowels-kana', 'type' => 'video'],
|
||||
['title' => 'Baris KA-KI-KU-KE-KO', 'slug' => 'ka-line', 'type' => 'video'],
|
||||
['title' => 'Baris A-I-U-E-O', 'slug' => 'vowels-kana', 'type' => 'video', 'video_url' => 'https://www.youtube.com/watch?v=icK6kVTegDA'],
|
||||
['title' => 'Baris KA-KI-KU-KE-KO', 'slug' => 'ka-line', 'type' => 'video', 'video_url' => 'https://www.youtube.com/watch?v=icK6kVTegDA'],
|
||||
];
|
||||
|
||||
foreach ($lessons2 as $index => $lessonData) {
|
||||
Lesson::updateOrCreate(
|
||||
['module_id' => $module2->id, 'slug' => $lessonData['slug']],
|
||||
['title' => $lessonData['title'], 'type' => $lessonData['type'], 'order_index' => $index + 1]
|
||||
[
|
||||
'title' => $lessonData['title'],
|
||||
'type' => $lessonData['type'],
|
||||
'video_url' => $lessonData['video_url'],
|
||||
'order_index' => $index + 1
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user