Add admin-managed user creation
linter / quality (pull_request) Successful in 1m14s
tests / ci (8.4) (pull_request) Successful in 1m37s

This commit is contained in:
2026-05-22 12:55:44 +00:00
parent 2bb74c20e1
commit d13e919310
17 changed files with 442 additions and 8 deletions
+1
View File
@@ -29,6 +29,7 @@ class UserFactory extends Factory
'name' => fake()->name(),
'email' => fake()->unique()->safeEmail(),
'email_verified_at' => now(),
'must_change_password_on_next_login' => false,
'password' => static::$password ??= Hash::make('password'),
'remember_token' => Str::random(10),
'two_factor_secret' => null,
@@ -0,0 +1,30 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('users', function (Blueprint $table): void {
$table->boolean('must_change_password_on_next_login')
->default(false)
->after('password');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('users', function (Blueprint $table): void {
$table->dropColumn('must_change_password_on_next_login');
});
}
};