diff --git a/database/seeds/SysLanguageInit.php b/database/seeds/SysLanguageInit.php new file mode 100644 index 00000000..db1e81a2 --- /dev/null +++ b/database/seeds/SysLanguageInit.php @@ -0,0 +1,30 @@ + 1, "country_id" => 1, "name" => "中文简体", "en_name" => "Simplified Chinese", "code" => "zh-cn", "icon" => "/static/common/images/langs/CN.png", "url" => "//dev.ow.f2b211.com", "status" => 1, "is_default" => 0, "sort" => 0, "created_at" => "2025-01-04 14:06:01", "updated_at" => "2025-05-24 14:18:16"], + ["id" => 2, "country_id" => 2, "name" => "英语", "en_name" => "English", "code" => "en-us", "icon" => "/static/common/images/langs/US.png", "url" => "//dev.ow.us.f2b211.com", "status" => 1, "is_default" => 0, "sort" => 0, "created_at" => "2025-03-25 13:48:57", "updated_at" => "2025-05-24 14:18:16"] + ]; + + $table = $this->table('sys_language'); + + // empty the table + $table->truncate(); + + // insert data + $table->insert($data)->saveData(); + } +} \ No newline at end of file