Skip to content

Commit

Permalink
Merge pull request #225 from dbarzin/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
dbarzin authored Nov 12, 2024
2 parents ec3df2e + 35f624f commit f1e5de5
Showing 1 changed file with 15 additions and 12 deletions.
27 changes: 15 additions & 12 deletions database/seeds/DatabaseSeeder.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,21 @@ class DatabaseSeeder extends Seeder
*/
public function run()
{
$lang = ENV('LANG');
if (($lang!=="fr")&&($lang!=="de"))
$lang="en";
if (DB::table('users')->count()==0) {

DB::table('users')->insert([
'login' => 'admin',
'name' => 'Administrator',
'title' => 'Pirate Captain',
'role' => 1,
'language' => $lang,
'email' => 'admin@admin.localhost',
'password' => bcrypt('admin'),
]);
$lang = ENV('LANG');
if (($lang!=="fr")&&($lang!=="de"))
$lang="en";

DB::table('users')->insert([
'login' => 'admin',
'name' => 'Administrator',
'title' => 'Pirate Captain',
'role' => 1,
'language' => $lang,
'email' => 'admin@admin.localhost',
'password' => bcrypt('admin'),
]);
}
}
}

0 comments on commit f1e5de5

Please sign in to comment.