mirror of
https://github.com/nihonbuzz/nihonbuzz-academy.git
synced 2026-01-26 21:41:54 +07:00
first commit
This commit is contained in:
28
database/seeders/LevelSeeder.php
Normal file
28
database/seeders/LevelSeeder.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class LevelSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*/
|
||||
public function run(): void
|
||||
{
|
||||
$levels = [
|
||||
['code' => 'BASIC', 'name' => 'Bahasa Jepang Dasar', 'order_index' => 0, 'description' => 'Level pengenalan hiragana, katakana, dan ungkapan dasar.'],
|
||||
['code' => 'N5', 'name' => 'Beginner', 'order_index' => 1, 'description' => 'The ability to understand some basic Japanese.'],
|
||||
['code' => 'N4', 'name' => 'Elementary', 'order_index' => 2, 'description' => 'The ability to understand basic Japanese.'],
|
||||
['code' => 'N3', 'name' => 'Intermediate', 'order_index' => 3, 'description' => 'The ability to understand Japanese used in everyday situations to a certain degree.'],
|
||||
['code' => 'N2', 'name' => 'Pre-Advanced', 'order_index' => 4, 'description' => 'The ability to understand Japanese used in everyday situations, and in a variety of circumstances to a certain degree.'],
|
||||
['code' => 'N1', 'name' => 'Advanced', 'order_index' => 5, 'description' => 'The ability to understand Japanese used in a variety of circumstances.'],
|
||||
];
|
||||
|
||||
foreach ($levels as $level) {
|
||||
\App\Models\Level::firstOrCreate(['code' => $level['code']], $level);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user