Skip to content

Commit

Permalink
Make default users variable public
Browse files Browse the repository at this point in the history
  • Loading branch information
relliv committed Aug 24, 2024
1 parent 3c13e35 commit 0dea5a5
Showing 1 changed file with 19 additions and 19 deletions.
38 changes: 19 additions & 19 deletions database/seeders/Local/User/DefaultUserSeeder.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,30 +8,30 @@

class DefaultUserSeeder extends Seeder
{
public array $defaultUsers = [
[
'email' => '[email protected]',
'name' => 'Super Admin',
// 'username' => 'superAdmin',
],
[
'email' => '[email protected]',
'name' => 'Admin',
// 'username' => 'admin',
],
[
'email' => '[email protected]',
'name' => 'User Muser',
// 'username' => 'userMuser',
],
];

/**
* Run the database seeds.
*/
public function run(): void
{
$defaultUsers = [
[
'email' => '[email protected]',
'name' => 'Super Admin Madmin',
// 'username' => 'superAdmin',
],
[
'email' => '[email protected]',
'name' => 'Admin Madmin',
// 'username' => 'admin',
],
[
'email' => '[email protected]',
'name' => 'User Muser',
// 'username' => 'userMuser',
],
];

foreach ($defaultUsers as $user) {
foreach ($this->defaultUsers as $user) {
if (User::where('email', $user['email'])->count() === 0) {
User::create([
'email' => $user['email'],
Expand Down

0 comments on commit 0dea5a5

Please sign in to comment.