From 0dea5a5125273261fd70f15a361dd8b491d9deec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ey=C3=BCp=20Erdo=C4=9Fan?= Date: Sun, 25 Aug 2024 00:05:00 +0300 Subject: [PATCH] Make default users variable public --- .../seeders/Local/User/DefaultUserSeeder.php | 38 +++++++++---------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/database/seeders/Local/User/DefaultUserSeeder.php b/database/seeders/Local/User/DefaultUserSeeder.php index fa4bc65..64235ee 100644 --- a/database/seeders/Local/User/DefaultUserSeeder.php +++ b/database/seeders/Local/User/DefaultUserSeeder.php @@ -8,30 +8,30 @@ class DefaultUserSeeder extends Seeder { + public array $defaultUsers = [ + [ + 'email' => 'super_admin@example.com', + 'name' => 'Super Admin', + // 'username' => 'superAdmin', + ], + [ + 'email' => 'admin@example.com', + 'name' => 'Admin', + // 'username' => 'admin', + ], + [ + 'email' => 'user@example.com', + 'name' => 'User Muser', + // 'username' => 'userMuser', + ], + ]; + /** * Run the database seeds. */ public function run(): void { - $defaultUsers = [ - [ - 'email' => 'super_admin@example.com', - 'name' => 'Super Admin Madmin', - // 'username' => 'superAdmin', - ], - [ - 'email' => 'admin@example.com', - 'name' => 'Admin Madmin', - // 'username' => 'admin', - ], - [ - 'email' => 'user@example.com', - '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'],