From f899893a6a2d2f2fd1d6e2f90350d8062be04618 Mon Sep 17 00:00:00 2001 From: Twyco Date: Sun, 12 Apr 2026 20:10:34 +0200 Subject: [PATCH] added user create command --- .../Commands/CreateInitialAdminUser.php | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 app/Console/Commands/CreateInitialAdminUser.php diff --git a/app/Console/Commands/CreateInitialAdminUser.php b/app/Console/Commands/CreateInitialAdminUser.php new file mode 100644 index 0000000..337a37b --- /dev/null +++ b/app/Console/Commands/CreateInitialAdminUser.php @@ -0,0 +1,34 @@ + $this->argument('name'), + 'email' => $this->argument('email'), + 'password' => Hash::make($this->argument('password')), + ]); + $this->info('User created'); + + $user->permissionAssignments()->create([ + 'permission' => Permission::GlobalAdmin, + ]); + + return self::SUCCESS; + } +}