Commit eb53246a authored by Jack Stupple's avatar Jack Stupple

changes to languages

parent c1820924
......@@ -187,16 +187,16 @@ class Initial extends Migration
]);
DB::table('languages')->insert([
'name' => 'Nederlands',
'name' => 'Dutch',
'slug' => 'nl',
'enabled' => $this->created_at,
'created_at' => $this->created_at
]);
DB::table('languages')->insert([
'name' => 'Deutch',
'name' => 'German',
'slug' => 'de',
'enabled' => null,
'enabled' => $this->created_at,
'created_at' => $this->created_at
]);
......
......@@ -14,27 +14,22 @@ class AddNewSupportedLanguages extends Migration
public function up()
{
$now = date('Y-m-d H:i:s');
// remove the old one that was spelled wrong
$de = \App\Language::where('name', 'Deutsch')->first();
if ($de) {
$de->delete();
}
$de = \App\Language::firstOrCreate([
'name' => 'Deutsch',
'slug' => 'de'
]);
$de->enabled = $now;
$de->save();
$no = \App\Language::firstOrCreate([
'name' => 'Norsk',
'name' => 'Norwegian',
'slug' => 'no'
]);
$no->enabled = $now;
$no->save();
$sl = \App\Language::firstOrCreate([
'name' => 'Slovenian',
'slug' => 'sl'
]);
$sl->enabled = $now;
$sl->save();
}
/**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment