Migrate HickLab3D dashboard and add production auto deployment
Deploy HickLab3D Dashboard / Deploy to production (push) Failing after 19s

This commit is contained in:
Hickmeister
2026-10-10 18:51:23 +01:00
parent 8410a50f26
commit 88dd00551f
974 changed files with 14609 additions and 162573 deletions
+34
View File
@@ -0,0 +1,34 @@
<?php
namespace App\Console\Commands;
use App\Models\User;
use Illuminate\Console\Attributes\Description;
use Illuminate\Console\Attributes\Signature;
use Illuminate\Console\Command;
#[Signature('app:create-admin {username} {email}')]
#[Description('Create the first HickLab3D administrator')]
class CreateAdmin extends Command
{
public function handle(): int
{
$username = (string) $this->argument('username');
$email = (string) $this->argument('email');
if (User::where('username', $username)->orWhere('email', $email)->exists()) {
$this->error('That username or email already exists.');
return self::FAILURE;
}
$password = (string) $this->secret('Password (at least 12 characters)');
if (mb_strlen($password) < 12) {
$this->error('Password is too short.');
return self::FAILURE;
}
User::create(['username' => $username, 'email' => $email, 'role' => 'admin', 'password' => $password]);
$this->info('Administrator created.');
return self::SUCCESS;
}
}