Lege das Pruefkonto ohne Faker an
Deploy Test / test (push) Successful in 17s
Deploy Test / deploy (push) Successful in 22s

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
LarsandCursor committed 2026-11-16 08:45:16 +01:00
1 parent 1d8315c9a4
commit 8d0a0b8cc6
2 files changed
+22 -3

No files matched your search

+21 -3
View File
@@ -10,9 +10,12 @@
use App\Domain\Catalog\Offer;
use App\Domain\Catalog\OfferService;
use App\Domain\Entitlement\GrantIssuer;
use App\Domain\Identity\AccountStatus;
use App\Domain\Identity\Party;
use App\Domain\Identity\PartyType;
use App\Domain\Identity\Profile;
use App\Models\User;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\Hash;
class SeedLibraryReview extends Command
{
@@ -105,11 +108,26 @@ private function ensureTrainer(): void
$trainer = User::query()->where('email', 'trainer-pruefung@example.test')->first();
if ($trainer === null) {
$trainer = User::factory()->create([
$party = Party::query()->create([
'type' => PartyType::Person,
'display_name' => 'Trainer Prüfung',
]);
Profile::query()->create([
'party_id' => $party->id,
'display_name' => 'Trainer Prüfung',
'visibility' => ['display_name' => 'private'],
]);
$trainer = new User;
$trainer->forceFill([
'party_id' => $party->id,
'name' => 'Trainer Prüfung',
'email' => 'trainer-pruefung@example.test',
'password' => Hash::make('Kursraum-Pruefung'),
'password' => 'Kursraum-Pruefung',
'status' => AccountStatus::Aktiv,
'confirmed_adult_at' => now(),
'email_verified_at' => now(),
]);
$trainer->save();
}
$offer = Offer::query()->where('name', 'Prüfprogramm Abstand')->first();